.class public Lcom/melesta/engine/EngineActivity;
.super Landroid/app/Activity;
.source "EngineActivity.java"

# interfaces
.implements Lcom/tapjoy/TapjoyEarnedPointsNotifier;


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "DefaultLocale"
    }
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/melesta/engine/EngineActivity$25;,
        Lcom/melesta/engine/EngineActivity$MySSLSocketFactory;,
        Lcom/melesta/engine/EngineActivity$SessionStatusCallback;,
        Lcom/melesta/engine/EngineActivity$ActivityTickListener;
    }
.end annotation


# static fields
.field public static final FB_OS_FAILURE:I = 0x1

.field public static final FB_OS_SUCCESS:I = 0x0

.field private static final PREF_BACKUP_NAME:Ljava/lang/String; = "BackupName"

.field private static final PREF_BACKUP_TIME:Ljava/lang/String; = "BackupTime"

.field private static final PREF_SPONSORPAY_COINS:Ljava/lang/String; = "SponsorPayCoins"

.field private static final SEND_EMAIL:I = 0x65

.field private static instance:Lcom/melesta/engine/EngineActivity;

.field private static final mEasyTrustManager:Ljavax/net/ssl/TrustManager;

.field private static mIsTapjoyRefreshEarnedCurrencyRequestRunning:Z

.field protected static mPromoCodeUrl:Ljava/lang/String;

.field private static mTrustManagers:[Ljavax/net/ssl/TrustManager;

.field protected static mWhispersyncBlobCallback:Lcom/amazon/ags/api/whispersync/SynchronizeBlobCallback;


# instance fields
.field private agcEnabled:Z

.field agsGameCallback:Lcom/amazon/ags/api/AmazonGamesCallback;

.field private agsGameClient:Lcom/amazon/ags/api/AmazonGames;

.field private agsGameFeatures:Ljava/util/EnumSet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/EnumSet",
            "<",
            "Lcom/amazon/ags/api/AmazonGamesFeature;",
            ">;"
        }
    .end annotation
.end field

.field private final facebookStatusCallback:Lcom/facebook/Session$StatusCallback;

.field private final listeners:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/melesta/engine/EngineActivity$ActivityTickListener;",
            ">;"
        }
    .end annotation
.end field

.field private mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

.field private mChartboost:Lcom/chartboost/sdk/Chartboost;

.field protected mFacebookUserId:Ljava/lang/String;

.field private mFlurryApiKey:Ljava/lang/String;

.field private mFramelayout:Landroid/widget/RelativeLayout;

.field private mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

.field final mHandler:Landroid/os/Handler;

.field private mLanguage:Ljava/lang/String;

.field private mLastBackupName:Ljava/lang/String;

.field private mLastBackupTime:J

.field private mProgressFramelayout:Landroid/widget/RelativeLayout;

.field private mRenderer:Lcom/melesta/engine/Renderer;

.field private mUiHelper:Lcom/facebook/UiLifecycleHelper;

.field private mailId:I

.field private mobileAppTracker:Lcom/mobileapptracker/MobileAppTracker;


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 187
    new-instance v0, Lcom/melesta/engine/amazon/WhispersyncBlobCallback;

    invoke-direct {v0}, Lcom/melesta/engine/amazon/WhispersyncBlobCallback;-><init>()V

    sput-object v0, Lcom/melesta/engine/EngineActivity;->mWhispersyncBlobCallback:Lcom/amazon/ags/api/whispersync/SynchronizeBlobCallback;

    .line 1044
    sput-boolean v2, Lcom/melesta/engine/EngineActivity;->mIsTapjoyRefreshEarnedCurrencyRequestRunning:Z

    .line 1540
    new-instance v0, Lcom/melesta/engine/EngineActivity$10;

    invoke-direct {v0}, Lcom/melesta/engine/EngineActivity$10;-><init>()V

    sput-object v0, Lcom/melesta/engine/EngineActivity;->mEasyTrustManager:Ljavax/net/ssl/TrustManager;

    .line 1557
    const/4 v0, 0x1

    new-array v0, v0, [Ljavax/net/ssl/TrustManager;

    sget-object v1, Lcom/melesta/engine/EngineActivity;->mEasyTrustManager:Ljavax/net/ssl/TrustManager;

    aput-object v1, v0, v2

    sput-object v0, Lcom/melesta/engine/EngineActivity;->mTrustManagers:[Ljavax/net/ssl/TrustManager;

    return-void
.end method

.method public constructor <init>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 141
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 177
    iput-object v2, p0, Lcom/melesta/engine/EngineActivity;->mobileAppTracker:Lcom/mobileapptracker/MobileAppTracker;

    .line 181
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    .line 183
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/melesta/engine/EngineActivity;->mHandler:Landroid/os/Handler;

    .line 189
    new-instance v0, Lcom/melesta/engine/EngineActivity$SessionStatusCallback;

    invoke-direct {v0, p0, v1, v1}, Lcom/melesta/engine/EngineActivity$SessionStatusCallback;-><init>(Lcom/melesta/engine/EngineActivity;II)V

    iput-object v0, p0, Lcom/melesta/engine/EngineActivity;->facebookStatusCallback:Lcom/facebook/Session$StatusCallback;

    .line 285
    new-instance v0, Lcom/melesta/engine/EngineActivity$1;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineActivity$1;-><init>(Lcom/melesta/engine/EngineActivity;)V

    iput-object v0, p0, Lcom/melesta/engine/EngineActivity;->agsGameCallback:Lcom/amazon/ags/api/AmazonGamesCallback;

    .line 1262
    const/4 v0, -0x1

    iput v0, p0, Lcom/melesta/engine/EngineActivity;->mailId:I

    .line 1560
    iput-object v2, p0, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    .line 1566
    return-void
.end method

.method static synthetic access$1000(Lcom/melesta/engine/EngineActivity;)Lcom/melesta/engine/EngineGLSurfaceView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 141
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    return-object v0
.end method

.method static synthetic access$1100(Lcom/melesta/engine/EngineActivity;)Lcom/melesta/engine/Renderer;
    .locals 1
    .parameter "x0"

    .prologue
    .line 141
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mRenderer:Lcom/melesta/engine/Renderer;

    return-object v0
.end method

.method static synthetic access$1200(Lcom/melesta/engine/EngineActivity;)Landroid/widget/RelativeLayout;
    .locals 1
    .parameter "x0"

    .prologue
    .line 141
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mProgressFramelayout:Landroid/widget/RelativeLayout;

    return-object v0
.end method

.method static synthetic access$1300(Lcom/melesta/engine/EngineActivity;)Landroid/widget/RelativeLayout;
    .locals 1
    .parameter "x0"

    .prologue
    .line 141
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mFramelayout:Landroid/widget/RelativeLayout;

    return-object v0
.end method

.method static synthetic access$1400(Lcom/melesta/engine/EngineActivity;D)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 141
    invoke-direct {p0, p1, p2}, Lcom/melesta/engine/EngineActivity;->sponsorPaySaveCoins(D)V

    return-void
.end method

.method static synthetic access$1500(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;J)V
    .locals 0
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"

    .prologue
    .line 141
    invoke-direct {p0, p1, p2, p3}, Lcom/melesta/engine/EngineActivity;->savePreference(Ljava/lang/String;J)V

    return-void
.end method

.method static synthetic access$200(Lcom/melesta/engine/EngineActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 141
    iget v0, p0, Lcom/melesta/engine/EngineActivity;->mailId:I

    return v0
.end method

.method static synthetic access$302(Z)Z
    .locals 0
    .parameter "x0"

    .prologue
    .line 141
    sput-boolean p0, Lcom/melesta/engine/EngineActivity;->mIsTapjoyRefreshEarnedCurrencyRequestRunning:Z

    return p0
.end method

.method static synthetic access$400(Lcom/tapjoy/TapjoyConnect;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 141
    invoke-static {p0, p1}, Lcom/melesta/engine/EngineActivity;->tapjoyProcessEarnedPoints(Lcom/tapjoy/TapjoyConnect;I)V

    return-void
.end method

.method static synthetic access$500()[Ljavax/net/ssl/TrustManager;
    .locals 1

    .prologue
    .line 141
    sget-object v0, Lcom/melesta/engine/EngineActivity;->mTrustManagers:[Ljavax/net/ssl/TrustManager;

    return-object v0
.end method

.method static synthetic access$600(Lcom/melesta/engine/EngineActivity;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 141
    invoke-direct {p0}, Lcom/melesta/engine/EngineActivity;->getUserEmail()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$700(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"
    .parameter "x3"

    .prologue
    .line 141
    invoke-direct {p0, p1, p2, p3}, Lcom/melesta/engine/EngineActivity;->postPromocodeRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$800()Z
    .locals 1

    .prologue
    .line 141
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->canPostPromoCode()Z

    move-result v0

    return v0
.end method

.method static synthetic access$900(Lcom/melesta/payment/PaymentTransaction;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 141
    invoke-static {p0}, Lcom/melesta/engine/EngineActivity;->postPromoCode(Lcom/melesta/payment/PaymentTransaction;)V

    return-void
.end method

.method private static backupBytes(Ljava/io/DataOutputStream;[B)V
    .locals 2
    .parameter "out"
    .parameter "data"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 1406
    move-object v0, p1

    .line 1408
    .local v0, buf:[B
    if-eqz v0, :cond_0

    .line 1409
    array-length v1, v0

    invoke-virtual {p0, v1}, Ljava/io/DataOutputStream;->writeInt(I)V

    .line 1410
    invoke-virtual {p0, v0}, Ljava/io/DataOutputStream;->write([B)V

    .line 1414
    :goto_0
    return-void

    .line 1412
    :cond_0
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Ljava/io/DataOutputStream;->writeInt(I)V

    goto :goto_0
.end method

.method private static canPostPromoCode()Z
    .locals 1

    .prologue
    .line 1616
    sget-object v0, Lcom/melesta/engine/EngineActivity;->mPromoCodeUrl:Ljava/lang/String;

    if-eqz v0, :cond_0

    sget-object v0, Lcom/melesta/engine/EngineActivity;->mPromoCodeUrl:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static chartboostShowInterstitial(Ljava/lang/String;)Z
    .locals 6
    .parameter "location"

    .prologue
    .line 1123
    const/4 v3, 0x0

    .line 1125
    .local v3, res:Z
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    .line 1126
    .local v1, engineActivity:Lcom/melesta/engine/EngineActivity;
    if-nez v1, :cond_0

    move v4, v3

    .line 1152
    .end local v1           #engineActivity:Lcom/melesta/engine/EngineActivity;
    .end local v3           #res:Z
    .local v4, res:I
    :goto_0
    return v4

    .line 1129
    .end local v4           #res:I
    .restart local v1       #engineActivity:Lcom/melesta/engine/EngineActivity;
    .restart local v3       #res:Z
    :cond_0
    iget-object v0, v1, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    .line 1130
    .local v0, cb:Lcom/chartboost/sdk/Chartboost;
    if-nez v0, :cond_1

    move v4, v3

    .line 1131
    .restart local v4       #res:I
    goto :goto_0

    .line 1133
    .end local v4           #res:I
    :cond_1
    if-nez p0, :cond_3

    .line 1134
    invoke-virtual {v0}, Lcom/chartboost/sdk/Chartboost;->hasCachedInterstitial()Z

    move-result v5

    if-eqz v5, :cond_2

    .line 1135
    invoke-virtual {v0}, Lcom/chartboost/sdk/Chartboost;->showInterstitial()V

    .line 1136
    const/4 v3, 0x1

    .line 1139
    :cond_2
    invoke-virtual {v0}, Lcom/chartboost/sdk/Chartboost;->cacheInterstitial()V

    .end local v0           #cb:Lcom/chartboost/sdk/Chartboost;
    .end local v1           #engineActivity:Lcom/melesta/engine/EngineActivity;
    :goto_1
    move v4, v3

    .line 1152
    .restart local v4       #res:I
    goto :goto_0

    .line 1141
    .end local v4           #res:I
    .restart local v0       #cb:Lcom/chartboost/sdk/Chartboost;
    .restart local v1       #engineActivity:Lcom/melesta/engine/EngineActivity;
    :cond_3
    invoke-virtual {v0, p0}, Lcom/chartboost/sdk/Chartboost;->hasCachedInterstitial(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_4

    .line 1142
    invoke-virtual {v0, p0}, Lcom/chartboost/sdk/Chartboost;->showInterstitial(Ljava/lang/String;)V

    .line 1143
    const/4 v3, 0x1

    .line 1146
    :cond_4
    invoke-virtual {v0, p0}, Lcom/chartboost/sdk/Chartboost;->cacheInterstitial(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 1148
    .end local v0           #cb:Lcom/chartboost/sdk/Chartboost;
    .end local v1           #engineActivity:Lcom/melesta/engine/EngineActivity;
    :catch_0
    move-exception v2

    .line 1149
    .local v2, exc:Ljava/lang/Exception;
    const-string v5, "chartboostShowInterstitial"

    invoke-static {v5, v2}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method

.method private checkMessage(Landroid/content/Intent;)V
    .locals 3
    .parameter "intent"

    .prologue
    .line 437
    if-eqz p1, :cond_0

    .line 438
    const-string v0, "PUSH_RECEIVE_EVENT"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 439
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "push message is "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    const-string v2, "PUSH_RECEIVE_EVENT"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/melesta/engine/EngineActivity;->showToast(Ljava/lang/String;)V

    .line 450
    :cond_0
    :goto_0
    return-void

    .line 440
    :cond_1
    const-string v0, "REGISTER_EVENT"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 441
    const-string v0, "register"

    invoke-direct {p0, v0}, Lcom/melesta/engine/EngineActivity;->showToast(Ljava/lang/String;)V

    goto :goto_0

    .line 442
    :cond_2
    const-string v0, "UNREGISTER_EVENT"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 443
    const-string v0, "unregister"

    invoke-direct {p0, v0}, Lcom/melesta/engine/EngineActivity;->showToast(Ljava/lang/String;)V

    goto :goto_0

    .line 444
    :cond_3
    const-string v0, "REGISTER_ERROR_EVENT"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_4

    .line 445
    const-string v0, "register error"

    invoke-direct {p0, v0}, Lcom/melesta/engine/EngineActivity;->showToast(Ljava/lang/String;)V

    goto :goto_0

    .line 446
    :cond_4
    const-string v0, "UNREGISTER_ERROR_EVENT"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 447
    const-string v0, "unregister error"

    invoke-direct {p0, v0}, Lcom/melesta/engine/EngineActivity;->showToast(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public static checkPromocode(Ljava/lang/String;)V
    .locals 3
    .parameter "code"

    .prologue
    .line 1959
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    .line 1960
    .local v0, ea:Lcom/melesta/engine/EngineActivity;
    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Lcom/melesta/engine/EngineActivity;->showWaitScreen(Z)V

    .line 1962
    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/melesta/engine/EngineActivity$18;

    invoke-direct {v2, v0, p0}, Lcom/melesta/engine/EngineActivity$18;-><init>(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;)V

    invoke-direct {v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 2006
    .local v1, t:Ljava/lang/Thread;
    const-string v2, "postPromo"

    invoke-virtual {v1, v2}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V

    .line 2007
    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    .line 2008
    return-void
.end method

.method public static enableSleep(Z)V
    .locals 3
    .parameter "enable"

    .prologue
    .line 2041
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    if-nez v1, :cond_1

    .line 2059
    :cond_0
    :goto_0
    return-void

    .line 2044
    :cond_1
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    invoke-virtual {v1}, Lcom/melesta/engine/EngineActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    .line 2045
    .local v0, window:Landroid/view/Window;
    if-eqz v0, :cond_0

    .line 2048
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    new-instance v2, Lcom/melesta/engine/EngineActivity$20;

    invoke-direct {v2, p0, v0}, Lcom/melesta/engine/EngineActivity$20;-><init>(ZLandroid/view/Window;)V

    invoke-virtual {v1, v2}, Lcom/melesta/engine/EngineActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public static exit()V
    .locals 2

    .prologue
    .line 1467
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    invoke-virtual {v1}, Lcom/melesta/engine/EngineActivity;->finish()V

    .line 1476
    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/System;->runFinalizersOnExit(Z)V

    .line 1485
    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/System;->exit(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1489
    .local v0, exc:Ljava/lang/Exception;
    :goto_0
    return-void

    .line 1486
    .end local v0           #exc:Ljava/lang/Exception;
    :catch_0
    move-exception v0

    .line 1487
    .restart local v0       #exc:Ljava/lang/Exception;
    const-string v1, "exit()"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static facebookGetGroupInfo(Ljava/lang/String;II)V
    .locals 0
    .parameter "group_id"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1183
    invoke-static {p0, p1, p2}, Lcom/melesta/engine/FacebookOperations;->facebookGetGroupInfo(Ljava/lang/String;II)V

    .line 1184
    return-void
.end method

.method public static facebookGetUserFriends(Ljava/lang/String;II)V
    .locals 0
    .parameter "user_facebook_id"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1248
    invoke-static {p0, p1, p2}, Lcom/melesta/engine/FacebookOperations;->getUserFriends(Ljava/lang/String;II)V

    .line 1249
    return-void
.end method

.method public static facebookGetUserGameFriends(Ljava/lang/String;II)V
    .locals 0
    .parameter "user_facebook_id"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1237
    invoke-static {p0, p1, p2}, Lcom/melesta/engine/FacebookOperations;->getUserGameFriends(Ljava/lang/String;II)V

    .line 1238
    return-void
.end method

.method public static facebookGetUserInfo(Ljava/lang/String;II)V
    .locals 0
    .parameter "user_facebook_id"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1187
    invoke-static {p0, p1, p2}, Lcom/melesta/engine/FacebookOperations;->facebookGetUserInfo(Ljava/lang/String;II)V

    .line 1188
    return-void
.end method

.method public static facebookInviteUsersInGame(Ljava/lang/String;Ljava/lang/String;II)V
    .locals 0
    .parameter "users_list"
    .parameter "body"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1171
    invoke-static {p0, p1, p2, p3}, Lcom/melesta/engine/FacebookOperations;->facebookInviteUsersInGame(Ljava/lang/String;Ljava/lang/String;II)V

    .line 1172
    return-void
.end method

.method public static facebookIsUserLikedGroup(Ljava/lang/String;Ljava/lang/String;II)V
    .locals 0
    .parameter "user_id"
    .parameter "group_id"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1253
    invoke-static {p0, p1, p2, p3}, Lcom/melesta/engine/FacebookOperations;->facebookIsUserLikedGroup(Ljava/lang/String;Ljava/lang/String;II)V

    .line 1254
    return-void
.end method

.method public static facebookLike()V
    .locals 0

    .prologue
    .line 1179
    invoke-static {}, Lcom/melesta/engine/FacebookOperations;->facebookLike()V

    .line 1180
    return-void
.end method

.method public static facebookLogin(II)V
    .locals 0
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1162
    invoke-static {p0, p1}, Lcom/melesta/engine/FacebookOperations;->facebookLogin(II)V

    .line 1163
    return-void
.end method

.method public static facebookPost(Ljava/lang/String;II)V
    .locals 0
    .parameter "body"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1175
    invoke-static {p0, p1, p2}, Lcom/melesta/engine/FacebookOperations;->facebookPost(Ljava/lang/String;II)V

    .line 1176
    return-void
.end method

.method public static facebookReceiveNotify(II)V
    .locals 0
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1166
    invoke-static {p0, p1}, Lcom/melesta/engine/FacebookOperations;->receiveNotify(II)V

    .line 1167
    return-void
.end method

.method public static facebookSendRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZII)V
    .locals 0
    .parameter "friends"
    .parameter "message"
    .parameter "data"
    .parameter "is_suggestion"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1226
    invoke-static/range {p0 .. p5}, Lcom/melesta/engine/FacebookOperations;->facebookSendRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZII)V

    .line 1227
    return-void
.end method

.method public static facebookSendRequestToFriends(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZII)V
    .locals 0
    .parameter "friends"
    .parameter "message"
    .parameter "data"
    .parameter "is_suggestion"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1209
    invoke-static/range {p0 .. p5}, Lcom/melesta/engine/FacebookOperations;->facebookSendRequestToFriends(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZII)V

    .line 1210
    return-void
.end method

.method public static facebookSetUserScore(Ljava/lang/String;III)V
    .locals 0
    .parameter "user_facebook_id"
    .parameter "score"
    .parameter "user_data"
    .parameter "callback"

    .prologue
    .line 1192
    invoke-static {p0, p1, p2, p3}, Lcom/melesta/engine/FacebookOperations;->facebookSetUserScore(Ljava/lang/String;III)V

    .line 1193
    return-void
.end method

.method private fireActivityResult(IILandroid/content/Intent;)V
    .locals 2
    .parameter "requestCode"
    .parameter "resultCode"
    .parameter "data"

    .prologue
    .line 971
    :try_start_0
    invoke-static {p0}, Lcom/melesta/expansions/ExpansionsManager;->getInstance(Landroid/content/Context;)Lcom/melesta/expansions/ExpansionsManager;

    move-result-object v1

    invoke-virtual {v1, p0, p1, p2, p3}, Lcom/melesta/expansions/ExpansionsManager;->fireActivityResult(Landroid/content/Context;IILandroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 975
    :goto_0
    return-void

    .line 972
    :catch_0
    move-exception v0

    .line 973
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "fireActivityStateChange"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method private fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V
    .locals 3
    .parameter "state"

    .prologue
    .line 1452
    :try_start_0
    invoke-static {p0}, Lcom/melesta/expansions/ExpansionsManager;->getInstance(Landroid/content/Context;)Lcom/melesta/expansions/ExpansionsManager;

    move-result-object v1

    iget-object v2, p0, Lcom/melesta/engine/EngineActivity;->mHandler:Landroid/os/Handler;

    invoke-virtual {v1, p1, p0, v2}, Lcom/melesta/expansions/ExpansionsManager;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;Landroid/content/Context;Landroid/os/Handler;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1456
    :goto_0
    return-void

    .line 1453
    :catch_0
    move-exception v0

    .line 1454
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "fireActivityStateChange"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method static fireBeginTick()V
    .locals 6

    .prologue
    .line 375
    sget-object v4, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    if-eqz v4, :cond_0

    .line 378
    :try_start_0
    sget-object v4, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    iget-object v5, v4, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    monitor-enter v5
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 379
    :try_start_1
    new-instance v3, Ljava/util/ArrayList;

    sget-object v4, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    iget-object v4, v4, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    invoke-direct {v3, v4}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    .line 380
    .local v3, lst:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/engine/EngineActivity$ActivityTickListener;>;"
    monitor-exit v5
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 381
    :try_start_2
    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/melesta/engine/EngineActivity$ActivityTickListener;

    .line 382
    .local v2, l:Lcom/melesta/engine/EngineActivity$ActivityTickListener;
    invoke-interface {v2}, Lcom/melesta/engine/EngineActivity$ActivityTickListener;->onBeginTick()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    .line 383
    .end local v1           #i$:Ljava/util/Iterator;
    .end local v2           #l:Lcom/melesta/engine/EngineActivity$ActivityTickListener;
    :catch_0
    move-exception v0

    .line 384
    .local v0, exc:Ljava/lang/Exception;
    const-string v4, "fireBeginTick"

    invoke-static {v4, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    .line 387
    .end local v0           #exc:Ljava/lang/Exception;
    :cond_0
    return-void

    .line 380
    :catchall_0
    move-exception v4

    :try_start_3
    monitor-exit v5
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    :try_start_4
    throw v4
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0
.end method

.method static fireEndTick()V
    .locals 6

    .prologue
    .line 393
    sget-object v4, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    if-nez v4, :cond_1

    .line 406
    .local v3, lst:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/engine/EngineActivity$ActivityTickListener;>;"
    :cond_0
    :goto_0
    return-void

    .line 398
    .end local v3           #lst:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/engine/EngineActivity$ActivityTickListener;>;"
    :cond_1
    :try_start_0
    sget-object v4, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    iget-object v5, v4, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    monitor-enter v5
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 399
    :try_start_1
    new-instance v3, Ljava/util/ArrayList;

    sget-object v4, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    iget-object v4, v4, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    invoke-direct {v3, v4}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    .line 400
    .restart local v3       #lst:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/engine/EngineActivity$ActivityTickListener;>;"
    monitor-exit v5
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 401
    :try_start_2
    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/melesta/engine/EngineActivity$ActivityTickListener;

    .line 402
    .local v2, l:Lcom/melesta/engine/EngineActivity$ActivityTickListener;
    invoke-interface {v2}, Lcom/melesta/engine/EngineActivity$ActivityTickListener;->onEndTick()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_1

    .line 403
    .end local v1           #i$:Ljava/util/Iterator;
    .end local v2           #l:Lcom/melesta/engine/EngineActivity$ActivityTickListener;
    :catch_0
    move-exception v0

    .line 404
    .local v0, exc:Ljava/lang/Exception;
    const-string v4, "fireEndTick"

    invoke-static {v4, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0

    .line 400
    .end local v0           #exc:Ljava/lang/Exception;
    :catchall_0
    move-exception v4

    :try_start_3
    monitor-exit v5
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    :try_start_4
    throw v4
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0
.end method

.method public static flurryEndLogTimedEvent(Ljava/lang/String;)V
    .locals 4
    .parameter "event"

    .prologue
    .line 1013
    :try_start_0
    invoke-static {p0}, Lcom/flurry/android/FlurryAgent;->endTimedEvent(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1017
    :goto_0
    return-void

    .line 1014
    :catch_0
    move-exception v0

    .line 1015
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "flurryLogEvent(%s)"

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    aput-object p0, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static flurryLogEvent(Ljava/lang/String;Z)V
    .locals 4
    .parameter "event"
    .parameter "timed"

    .prologue
    .line 980
    :try_start_0
    invoke-static {p0, p1}, Lcom/flurry/android/FlurryAgent;->logEvent(Ljava/lang/String;Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 984
    :goto_0
    return-void

    .line 981
    :catch_0
    move-exception v0

    .line 982
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "flurryLogEvent(%s)"

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    aput-object p0, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static varargs flurryLogEvent(Ljava/lang/String;Z[Ljava/lang/Object;)V
    .locals 7
    .parameter "event"
    .parameter "timed"
    .parameter "args"

    .prologue
    .line 988
    :try_start_0
    new-instance v2, Ljava/util/HashMap;

    invoke-direct {v2}, Ljava/util/HashMap;-><init>()V

    .line 989
    .local v2, m:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    new-instance v3, Ljava/lang/StringBuffer;

    invoke-direct {v3}, Ljava/lang/StringBuffer;-><init>()V

    .line 990
    .local v3, sb:Ljava/lang/StringBuffer;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    array-length v4, p2

    if-ge v1, v4, :cond_1

    .line 991
    aget-object v4, p2, v1

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    add-int/lit8 v5, v1, 0x1

    aget-object v5, p2, v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v2, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 992
    invoke-virtual {v3}, Ljava/lang/StringBuffer;->length()I

    move-result v4

    if-lez v4, :cond_0

    .line 993
    const-string v4, " | "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 995
    :cond_0
    aget-object v4, p2, v1

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v4

    const/16 v5, 0x3a

    invoke-virtual {v4, v5}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    move-result-object v4

    add-int/lit8 v5, v1, 0x1

    aget-object v5, p2, v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 990
    add-int/lit8 v1, v1, 0x2

    goto :goto_0

    .line 998
    :cond_1
    invoke-static {p0, v2, p1}, Lcom/flurry/android/FlurryAgent;->logEvent(Ljava/lang/String;Ljava/util/Map;Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1009
    .end local v1           #i:I
    .end local v2           #m:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    .end local v3           #sb:Ljava/lang/StringBuffer;
    :goto_1
    return-void

    .line 1006
    :catch_0
    move-exception v0

    .line 1007
    .local v0, exc:Ljava/lang/Exception;
    const-string v4, "flurryLogEvent(%s)"

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    const/4 v6, 0x0

    aput-object p0, v5, v6

    invoke-static {v4, v5}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method

.method private getBackupName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 790
    const/4 v0, 0x0

    .line 791
    .local v0, backupName:Ljava/lang/String;
    iget-boolean v1, p0, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    if-eqz v1, :cond_0

    .line 792
    invoke-static {}, Lcom/melesta/engine/NativeEngineCallbacks;->getGameBackupName()Ljava/lang/String;

    move-result-object v0

    .line 794
    :cond_0
    return-object v0
.end method

.method public static getCurrentLanguage()Ljava/lang/String;
    .locals 1

    .prologue
    .line 1259
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mLanguage:Ljava/lang/String;

    return-object v0
.end method

.method public static getInstance()Lcom/melesta/engine/EngineActivity;
    .locals 2

    .prologue
    .line 1459
    sget-object v0, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    if-nez v0, :cond_0

    .line 1460
    const-string v0, "e"

    const-string v1, "e"

    invoke-static {v0, v1}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 1462
    :cond_0
    sget-object v0, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    return-object v0
.end method

.method private getNewHttpClient()Lorg/apache/http/client/HttpClient;
    .locals 10

    .prologue
    .line 1590
    :try_start_0
    invoke-static {}, Ljava/security/KeyStore;->getDefaultType()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/security/KeyStore;->getInstance(Ljava/lang/String;)Ljava/security/KeyStore;

    move-result-object v5

    .line 1591
    .local v5, trustStore:Ljava/security/KeyStore;
    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-virtual {v5, v6, v7}, Ljava/security/KeyStore;->load(Ljava/io/InputStream;[C)V

    .line 1593
    new-instance v4, Lcom/melesta/engine/EngineActivity$MySSLSocketFactory;

    invoke-direct {v4, p0, v5}, Lcom/melesta/engine/EngineActivity$MySSLSocketFactory;-><init>(Lcom/melesta/engine/EngineActivity;Ljava/security/KeyStore;)V

    .line 1594
    .local v4, sf:Lorg/apache/http/conn/ssl/SSLSocketFactory;
    sget-object v6, Lorg/apache/http/conn/ssl/SSLSocketFactory;->ALLOW_ALL_HOSTNAME_VERIFIER:Lorg/apache/http/conn/ssl/X509HostnameVerifier;

    invoke-virtual {v4, v6}, Lorg/apache/http/conn/ssl/SSLSocketFactory;->setHostnameVerifier(Lorg/apache/http/conn/ssl/X509HostnameVerifier;)V

    .line 1596
    new-instance v2, Lorg/apache/http/params/BasicHttpParams;

    invoke-direct {v2}, Lorg/apache/http/params/BasicHttpParams;-><init>()V

    .line 1597
    .local v2, params:Lorg/apache/http/params/HttpParams;
    sget-object v6, Lorg/apache/http/HttpVersion;->HTTP_1_1:Lorg/apache/http/HttpVersion;

    invoke-static {v2, v6}, Lorg/apache/http/params/HttpProtocolParams;->setVersion(Lorg/apache/http/params/HttpParams;Lorg/apache/http/ProtocolVersion;)V

    .line 1598
    const-string v6, "UTF-8"

    invoke-static {v2, v6}, Lorg/apache/http/params/HttpProtocolParams;->setContentCharset(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V

    .line 1599
    const/16 v6, 0xbb8

    invoke-static {v2, v6}, Lorg/apache/http/params/HttpConnectionParams;->setConnectionTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 1602
    new-instance v3, Lorg/apache/http/conn/scheme/SchemeRegistry;

    invoke-direct {v3}, Lorg/apache/http/conn/scheme/SchemeRegistry;-><init>()V

    .line 1603
    .local v3, registry:Lorg/apache/http/conn/scheme/SchemeRegistry;
    new-instance v6, Lorg/apache/http/conn/scheme/Scheme;

    const-string v7, "http"

    invoke-static {}, Lorg/apache/http/conn/scheme/PlainSocketFactory;->getSocketFactory()Lorg/apache/http/conn/scheme/PlainSocketFactory;

    move-result-object v8

    const/16 v9, 0x50

    invoke-direct {v6, v7, v8, v9}, Lorg/apache/http/conn/scheme/Scheme;-><init>(Ljava/lang/String;Lorg/apache/http/conn/scheme/SocketFactory;I)V

    invoke-virtual {v3, v6}, Lorg/apache/http/conn/scheme/SchemeRegistry;->register(Lorg/apache/http/conn/scheme/Scheme;)Lorg/apache/http/conn/scheme/Scheme;

    .line 1604
    new-instance v6, Lorg/apache/http/conn/scheme/Scheme;

    const-string v7, "https"

    const/16 v8, 0x1bb

    invoke-direct {v6, v7, v4, v8}, Lorg/apache/http/conn/scheme/Scheme;-><init>(Ljava/lang/String;Lorg/apache/http/conn/scheme/SocketFactory;I)V

    invoke-virtual {v3, v6}, Lorg/apache/http/conn/scheme/SchemeRegistry;->register(Lorg/apache/http/conn/scheme/Scheme;)Lorg/apache/http/conn/scheme/Scheme;

    .line 1606
    new-instance v0, Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager;

    invoke-direct {v0, v2, v3}, Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager;-><init>(Lorg/apache/http/params/HttpParams;Lorg/apache/http/conn/scheme/SchemeRegistry;)V

    .line 1608
    .local v0, ccm:Lorg/apache/http/conn/ClientConnectionManager;
    new-instance v6, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v6, v0, v2}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>(Lorg/apache/http/conn/ClientConnectionManager;Lorg/apache/http/params/HttpParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1611
    .end local v0           #ccm:Lorg/apache/http/conn/ClientConnectionManager;
    .end local v2           #params:Lorg/apache/http/params/HttpParams;
    .end local v3           #registry:Lorg/apache/http/conn/scheme/SchemeRegistry;
    .end local v4           #sf:Lorg/apache/http/conn/ssl/SSLSocketFactory;
    .end local v5           #trustStore:Ljava/security/KeyStore;
    :goto_0
    return-object v6

    .line 1609
    :catch_0
    move-exception v1

    .line 1610
    .local v1, e:Ljava/lang/Exception;
    invoke-static {v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    .line 1611
    new-instance v6, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v6}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    goto :goto_0
.end method

.method protected static getPromocode()Ljava/lang/String;
    .locals 2

    .prologue
    .line 1656
    invoke-static {}, Lcom/melesta/engine/NativeEngineCallbacks;->getGamePromocode()Ljava/lang/String;

    move-result-object v0

    .line 1657
    .local v0, code:Ljava/lang/String;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-lez v1, :cond_0

    .line 1660
    .end local v0           #code:Ljava/lang/String;
    :goto_0
    return-object v0

    .restart local v0       #code:Ljava/lang/String;
    :cond_0
    const-string v0, "0013TDI"

    goto :goto_0
.end method

.method private getSoftwareVersion()Ljava/lang/String;
    .locals 5

    .prologue
    .line 413
    :try_start_0
    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getPackageName()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 414
    .local v1, packageInfo:Landroid/content/pm/PackageInfo;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "."

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v1, Landroid/content/pm/PackageInfo;->versionCode:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v2

    .line 418
    .end local v1           #packageInfo:Landroid/content/pm/PackageInfo;
    :goto_0
    return-object v2

    .line 415
    :catch_0
    move-exception v0

    .line 416
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v2, "engine"

    const-string v3, "Package name not found"

    invoke-static {v2, v3, v0}, Lcom/melesta/engine/Log;->e(Ljava/lang/String;Ljava/lang/String;Landroid/content/pm/PackageManager$NameNotFoundException;)V

    .line 418
    const-string v2, ""

    goto :goto_0
.end method

.method private getUserEmail()Ljava/lang/String;
    .locals 8

    .prologue
    .line 1644
    const-string v6, "account"

    invoke-virtual {p0, v6}, Lcom/melesta/engine/EngineActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/accounts/AccountManager;

    .line 1645
    .local v5, manager:Landroid/accounts/AccountManager;
    invoke-virtual {v5}, Landroid/accounts/AccountManager;->getAccounts()[Landroid/accounts/Account;

    move-result-object v4

    .line 1647
    .local v4, list:[Landroid/accounts/Account;
    move-object v1, v4

    .local v1, arr$:[Landroid/accounts/Account;
    array-length v3, v1

    .local v3, len$:I
    const/4 v2, 0x0

    .local v2, i$:I
    :goto_0
    if-ge v2, v3, :cond_1

    aget-object v0, v1, v2

    .line 1648
    .local v0, account:Landroid/accounts/Account;
    iget-object v6, v0, Landroid/accounts/Account;->type:Ljava/lang/String;

    const-string v7, "com.google"

    invoke-virtual {v6, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 1649
    iget-object v6, v0, Landroid/accounts/Account;->name:Ljava/lang/String;

    .line 1652
    .end local v0           #account:Landroid/accounts/Account;
    :goto_1
    return-object v6

    .line 1647
    .restart local v0       #account:Landroid/accounts/Account;
    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 1652
    .end local v0           #account:Landroid/accounts/Account;
    :cond_1
    const-string v6, ""

    goto :goto_1
.end method

.method public static hideBanner()V
    .locals 3

    .prologue
    .line 2092
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    .line 2093
    .local v1, me:Lcom/melesta/engine/EngineActivity;
    if-nez v1, :cond_1

    .line 2115
    :cond_0
    :goto_0
    return-void

    .line 2096
    :cond_1
    iget-object v0, v1, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    .line 2097
    .local v0, banner:Lcom/burstly/lib/conveniencelayer/BurstlyAnimatedBanner;
    if-eqz v0, :cond_0

    .line 2100
    new-instance v2, Lcom/melesta/engine/EngineActivity$22;

    invoke-direct {v2, v1}, Lcom/melesta/engine/EngineActivity$22;-><init>(Lcom/melesta/engine/EngineActivity;)V

    invoke-virtual {v1, v2}, Lcom/melesta/engine/EngineActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public static openUrl(Ljava/lang/String;)V
    .locals 5
    .parameter "url"

    .prologue
    .line 1493
    :try_start_0
    const-string v2, "http://"

    invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    const-string v2, "https://"

    invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    const-string v2, "market://"

    invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    .line 1494
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "http://"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    .line 1496
    :cond_0
    new-instance v0, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-direct {v0, v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 1497
    .local v0, browserIntent:Landroid/content/Intent;
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v2

    invoke-virtual {v2, v0}, Lcom/melesta/engine/EngineActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1501
    .end local v0           #browserIntent:Landroid/content/Intent;
    :goto_0
    return-void

    .line 1498
    :catch_0
    move-exception v1

    .line 1499
    .local v1, exc:Ljava/lang/Exception;
    const-string v2, "openUrl"

    invoke-virtual {v1}, Ljava/lang/Exception;->toString()Ljava/lang/String;

    move-result-object v3

    const-string v4, "EngineActivity"

    invoke-static {v2, v3, v4}, Lcom/flurry/android/FlurryAgent;->onError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method private static postPromoCode(Lcom/melesta/payment/PaymentTransaction;)V
    .locals 4
    .parameter "pt"

    .prologue
    .line 1620
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->canPostPromoCode()Z

    move-result v2

    if-nez v2, :cond_0

    .line 1641
    :goto_0
    return-void

    .line 1623
    :cond_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getPromocode()Ljava/lang/String;

    move-result-object v0

    .line 1625
    .local v0, promocode:Ljava/lang/String;
    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/melesta/engine/EngineActivity$11;

    invoke-direct {v2, p0, v0}, Lcom/melesta/engine/EngineActivity$11;-><init>(Lcom/melesta/payment/PaymentTransaction;Ljava/lang/String;)V

    const-string v3, "SP-Thread"

    invoke-direct {v1, v2, v3}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 1640
    .local v1, t:Ljava/lang/Thread;
    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    goto :goto_0
.end method

.method private postPromocodeRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 12
    .parameter "paymentId"
    .parameter "gmail"
    .parameter "promocode"

    .prologue
    const/4 v8, 0x0

    .line 1665
    :try_start_0
    sget-object v9, Lcom/melesta/engine/EngineActivity;->mPromoCodeUrl:Ljava/lang/String;

    if-eqz v9, :cond_0

    sget-object v9, Lcom/melesta/engine/EngineActivity;->mPromoCodeUrl:Ljava/lang/String;

    invoke-virtual {v9}, Ljava/lang/String;->length()I

    move-result v9

    if-nez v9, :cond_1

    :cond_0
    move-object v6, v8

    .line 1709
    :goto_0
    return-object v6

    .line 1669
    :cond_1
    const-string v9, "TLS"

    invoke-static {v9}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;

    move-result-object v7

    .line 1670
    .local v7, sc:Ljavax/net/ssl/SSLContext;
    const/4 v9, 0x0

    sget-object v10, Lcom/melesta/engine/EngineActivity;->mTrustManagers:[Ljavax/net/ssl/TrustManager;

    const/4 v11, 0x0

    invoke-virtual {v7, v9, v10, v11}, Ljavax/net/ssl/SSLContext;->init([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V

    .line 1671
    invoke-virtual {v7}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;

    move-result-object v9

    invoke-static {v9}, Ljavax/net/ssl/HttpsURLConnection;->setDefaultSSLSocketFactory(Ljavax/net/ssl/SSLSocketFactory;)V

    .line 1674
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v9

    invoke-direct {v9}, Lcom/melesta/engine/EngineActivity;->getNewHttpClient()Lorg/apache/http/client/HttpClient;

    move-result-object v1

    .line 1677
    .local v1, httpclient:Lorg/apache/http/client/HttpClient;
    new-instance v2, Lorg/apache/http/client/methods/HttpPost;

    sget-object v9, Lcom/melesta/engine/EngineActivity;->mPromoCodeUrl:Ljava/lang/String;

    invoke-direct {v2, v9}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 1681
    .local v2, httppost:Lorg/apache/http/client/methods/HttpPost;
    :try_start_1
    new-instance v3, Ljava/util/ArrayList;

    const/4 v9, 0x4

    invoke-direct {v3, v9}, Ljava/util/ArrayList;-><init>(I)V

    .line 1682
    .local v3, nameValuePairs:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    new-instance v9, Lorg/apache/http/message/BasicNameValuePair;

    const-string v10, "promo_code"

    invoke-direct {v9, v10, p3}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v3, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 1683
    new-instance v9, Lorg/apache/http/message/BasicNameValuePair;

    const-string v10, "email"

    invoke-direct {v9, v10, p2}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v3, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 1684
    new-instance v9, Lorg/apache/http/message/BasicNameValuePair;

    const-string v10, "app_id"

    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getPackageName()Ljava/lang/String;

    move-result-object v11

    invoke-direct {v9, v10, v11}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v3, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 1685
    if-eqz p1, :cond_2

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_2

    .line 1686
    new-instance v9, Lorg/apache/http/message/BasicNameValuePair;

    const-string v10, "purchaseId"

    invoke-direct {v9, v10, p1}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v3, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 1689
    :cond_2
    new-instance v9, Lorg/apache/http/client/entity/UrlEncodedFormEntity;

    invoke-direct {v9, v3}, Lorg/apache/http/client/entity/UrlEncodedFormEntity;-><init>(Ljava/util/List;)V

    invoke-virtual {v2, v9}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 1692
    invoke-interface {v1, v2}, Lorg/apache/http/client/HttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v4

    .line 1694
    .local v4, response:Lorg/apache/http/HttpResponse;
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v5

    .line 1695
    .local v5, responseEntity:Lorg/apache/http/HttpEntity;
    if-eqz v5, :cond_3

    .line 1696
    invoke-static {v5}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;

    move-result-object v6

    .line 1698
    .local v6, responseStr:Ljava/lang/String;
    const-string v9, "engine"

    invoke-static {v9, v6}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1
    .catch Lorg/apache/http/client/ClientProtocolException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_0

    .line 1701
    .end local v3           #nameValuePairs:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    .end local v4           #response:Lorg/apache/http/HttpResponse;
    .end local v5           #responseEntity:Lorg/apache/http/HttpEntity;
    .end local v6           #responseStr:Ljava/lang/String;
    :catch_0
    move-exception v0

    .line 1702
    .local v0, e:Lorg/apache/http/client/ClientProtocolException;
    :try_start_2
    throw v0
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    .line 1706
    .end local v0           #e:Lorg/apache/http/client/ClientProtocolException;
    .end local v1           #httpclient:Lorg/apache/http/client/HttpClient;
    .end local v2           #httppost:Lorg/apache/http/client/methods/HttpPost;
    .end local v7           #sc:Ljavax/net/ssl/SSLContext;
    :catch_1
    move-exception v0

    .line 1707
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    .end local v0           #e:Ljava/lang/Exception;
    :cond_3
    move-object v6, v8

    .line 1709
    goto/16 :goto_0

    .line 1703
    .restart local v1       #httpclient:Lorg/apache/http/client/HttpClient;
    .restart local v2       #httppost:Lorg/apache/http/client/methods/HttpPost;
    .restart local v7       #sc:Ljavax/net/ssl/SSLContext;
    :catch_2
    move-exception v0

    .line 1704
    .local v0, e:Ljava/io/IOException;
    :try_start_3
    throw v0
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
.end method

.method public static purchaseProcessed(J)V
    .locals 5
    .parameter "_id"

    .prologue
    .line 1714
    :try_start_0
    const-string v3, "engine"

    const-string v4, "purchaseProcessed"

    invoke-static {v3, v4}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 1715
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    invoke-static {v3}, Lcom/melesta/engine/DatabaseHelper;->getHelper(Landroid/content/Context;)Lcom/melesta/engine/DatabaseHelper;

    move-result-object v0

    .line 1716
    .local v0, dbh:Lcom/melesta/engine/DatabaseHelper;
    invoke-virtual {v0, p0, p1}, Lcom/melesta/engine/DatabaseHelper;->getTransaction(J)Lcom/melesta/payment/PaymentTransaction;

    move-result-object v2

    .line 1717
    .local v2, pt:Lcom/melesta/payment/PaymentTransaction;
    if-nez v2, :cond_0

    .line 1718
    const-string v3, "engine"

    const-string v4, "error 1209"

    invoke-static {v3, v4}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 1744
    .end local v0           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v2           #pt:Lcom/melesta/payment/PaymentTransaction;
    :goto_0
    return-void

    .line 1722
    .restart local v0       #dbh:Lcom/melesta/engine/DatabaseHelper;
    .restart local v2       #pt:Lcom/melesta/payment/PaymentTransaction;
    :cond_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    new-instance v4, Lcom/melesta/engine/EngineActivity$12;

    invoke-direct {v4, v2, v0, p0, p1}, Lcom/melesta/engine/EngineActivity$12;-><init>(Lcom/melesta/payment/PaymentTransaction;Lcom/melesta/engine/DatabaseHelper;J)V

    invoke-virtual {v3, v4}, Lcom/melesta/engine/EngineActivity;->runOnUiThread(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1741
    .end local v0           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v2           #pt:Lcom/melesta/payment/PaymentTransaction;
    :catch_0
    move-exception v1

    .line 1742
    .local v1, e:Ljava/lang/Exception;
    invoke-static {v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static resetAmazonGameCircleProgress()V
    .locals 6

    .prologue
    .line 1843
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    .line 1844
    .local v3, me:Lcom/melesta/engine/EngineActivity;
    if-nez v3, :cond_1

    .line 1863
    :cond_0
    return-void

    .line 1847
    :cond_1
    iget-boolean v5, v3, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    if-eqz v5, :cond_0

    .line 1850
    iget-object v5, v3, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    invoke-interface {v5}, Lcom/amazon/ags/api/AmazonGames;->getAchievementsClient()Lcom/amazon/ags/api/achievements/AchievementsClient;

    move-result-object v0

    .line 1852
    .local v0, achievementsClient:Lcom/amazon/ags/api/achievements/AchievementsClient;
    invoke-static {}, Lcom/melesta/engine/AwardsHelper;->getHelper()Lcom/melesta/engine/AwardsHelper;

    move-result-object v5

    invoke-virtual {v5}, Lcom/melesta/engine/AwardsHelper;->getAchievementsIds()Ljava/util/Collection;

    move-result-object v5

    invoke-interface {v5}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 1853
    .local v2, id:Ljava/lang/String;
    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Object;

    invoke-interface {v0, v2, v5}, Lcom/amazon/ags/api/achievements/AchievementsClient;->resetAchievement(Ljava/lang/String;[Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;

    move-result-object v4

    .line 1855
    .local v4, resetAchievements:Lcom/amazon/ags/api/AGResponseHandle;,"Lcom/amazon/ags/api/AGResponseHandle<Lcom/amazon/ags/api/RequestResponse;>;"
    new-instance v5, Lcom/melesta/engine/EngineActivity$15;

    invoke-direct {v5}, Lcom/melesta/engine/EngineActivity$15;-><init>()V

    invoke-interface {v4, v5}, Lcom/amazon/ags/api/AGResponseHandle;->setCallback(Lcom/amazon/ags/api/AGResponseCallback;)V

    goto :goto_0
.end method

.method public static restoreAll([B)Z
    .locals 4
    .parameter "data"

    .prologue
    .line 1830
    const-string v2, "engine"

    const-string v3, "restore all"

    invoke-static {v2, v3}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 1832
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v2

    invoke-static {v2}, Lcom/melesta/engine/DatabaseHelper;->getHelper(Landroid/content/Context;)Lcom/melesta/engine/DatabaseHelper;

    move-result-object v0

    .line 1833
    .local v0, dbh:Lcom/melesta/engine/DatabaseHelper;
    invoke-static {v0, p0}, Lcom/melesta/engine/DbBackup;->restoreAll(Lcom/melesta/engine/DatabaseHelper;[B)Z

    move-result v1

    .line 1835
    .local v1, res:Z
    if-eqz v1, :cond_0

    .line 1836
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v2

    invoke-virtual {v2}, Lcom/melesta/engine/EngineActivity;->reloadProfile()V

    .line 1839
    :cond_0
    return v1
.end method

.method private runBackup()V
    .locals 7

    .prologue
    .line 799
    :try_start_0
    invoke-static {p0}, Lcom/melesta/engine/DatabaseHelper;->getHelper(Landroid/content/Context;)Lcom/melesta/engine/DatabaseHelper;

    move-result-object v1

    .line 800
    .local v1, dbh:Lcom/melesta/engine/DatabaseHelper;
    invoke-virtual {v1}, Lcom/melesta/engine/DatabaseHelper;->getDbModificationTime()J

    move-result-wide v3

    .line 801
    .local v3, modTime:J
    iget-wide v5, p0, Lcom/melesta/engine/EngineActivity;->mLastBackupTime:J

    cmp-long v5, v3, v5

    if-gtz v5, :cond_0

    .line 812
    .end local v1           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v3           #modTime:J
    :goto_0
    return-void

    .line 804
    .restart local v1       #dbh:Lcom/melesta/engine/DatabaseHelper;
    .restart local v3       #modTime:J
    :cond_0
    new-instance v5, Ljava/util/Date;

    invoke-direct {v5}, Ljava/util/Date;-><init>()V

    invoke-virtual {v5}, Ljava/util/Date;->getTime()J

    move-result-wide v5

    iput-wide v5, p0, Lcom/melesta/engine/EngineActivity;->mLastBackupTime:J

    .line 806
    invoke-direct {p0}, Lcom/melesta/engine/EngineActivity;->getBackupName()Ljava/lang/String;

    move-result-object v0

    .line 808
    .local v0, backupName:Ljava/lang/String;
    invoke-static {v0}, Lcom/melesta/engine/EngineActivity;->runBackup(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 809
    .end local v0           #backupName:Ljava/lang/String;
    .end local v1           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v3           #modTime:J
    :catch_0
    move-exception v2

    .line 810
    .local v2, e:Ljava/lang/Exception;
    invoke-static {v2}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static runBackup(Ljava/lang/String;)V
    .locals 12
    .parameter "backupName"

    .prologue
    .line 816
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v4

    .line 817
    .local v4, me:Lcom/melesta/engine/EngineActivity;
    invoke-static {v4}, Lcom/melesta/engine/DatabaseHelper;->getHelper(Landroid/content/Context;)Lcom/melesta/engine/DatabaseHelper;

    move-result-object v2

    .line 818
    .local v2, dbh:Lcom/melesta/engine/DatabaseHelper;
    iget-object v7, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    if-eqz v7, :cond_0

    iget-object v7, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    invoke-virtual {v7}, Ljava/lang/String;->length()I

    move-result v7

    if-eqz v7, :cond_0

    iget-object v7, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    invoke-virtual {v7, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 845
    .end local v2           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v4           #me:Lcom/melesta/engine/EngineActivity;
    :goto_0
    return-void

    .line 823
    .restart local v2       #dbh:Lcom/melesta/engine/DatabaseHelper;
    .restart local v4       #me:Lcom/melesta/engine/EngineActivity;
    :cond_0
    const-string v7, "engine"

    const-string v8, "Backup: %s, prev:%s"

    const/4 v9, 0x2

    new-array v9, v9, [Ljava/lang/Object;

    const/4 v10, 0x0

    aput-object p0, v9, v10

    const/4 v10, 0x1

    iget-object v11, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    aput-object v11, v9, v10

    invoke-static {v8, v9}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 825
    iget-boolean v7, v4, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    if-eqz v7, :cond_1

    .line 826
    new-instance v5, Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;

    sget-object v7, Lcom/melesta/engine/EngineActivity;->mWhispersyncBlobCallback:Lcom/amazon/ags/api/whispersync/SynchronizeBlobCallback;

    invoke-direct {v5, v7}, Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;-><init>(Lcom/amazon/ags/api/whispersync/SynchronizeBlobCallback;)V

    .line 828
    .local v5, syncBlobRequest:Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;
    invoke-static {v2}, Lcom/melesta/engine/DbBackup;->backupAll(Lcom/melesta/engine/DatabaseHelper;)[B

    move-result-object v1

    .line 829
    .local v1, data:[B
    invoke-virtual {v5, v1}, Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;->setData([B)V

    .line 830
    invoke-virtual {v5, p0}, Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;->setDescription(Ljava/lang/String;)V

    .line 831
    invoke-static {}, Lcom/amazon/ags/api/AmazonGamesClient;->getInstance()Lcom/amazon/ags/api/AmazonGames;

    move-result-object v7

    invoke-interface {v7}, Lcom/amazon/ags/api/AmazonGames;->getWhisperSyncClient()Lcom/amazon/ags/api/whispersync/WhisperSyncClient;

    move-result-object v6

    .line 832
    .local v6, whisperSync:Lcom/amazon/ags/api/whispersync/WhisperSyncClient;
    invoke-interface {v6, v5}, Lcom/amazon/ags/api/whispersync/WhisperSyncClient;->synchronizeProgress(Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;)V

    .line 838
    .end local v1           #data:[B
    .end local v5           #syncBlobRequest:Lcom/amazon/ags/api/whispersync/SynchronizeBlobProgressRequest;
    .end local v6           #whisperSync:Lcom/amazon/ags/api/whispersync/WhisperSyncClient;
    :goto_1
    iput-object p0, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    .line 840
    const-string v7, "BackupTime"

    iget-wide v8, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupTime:J

    invoke-direct {v4, v7, v8, v9}, Lcom/melesta/engine/EngineActivity;->savePreference(Ljava/lang/String;J)V

    .line 841
    const-string v7, "BackupName"

    iget-object v8, v4, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    invoke-direct {v4, v7, v8}, Lcom/melesta/engine/EngineActivity;->savePreference(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 842
    .end local v2           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v4           #me:Lcom/melesta/engine/EngineActivity;
    :catch_0
    move-exception v3

    .line 843
    .local v3, e:Ljava/lang/Exception;
    invoke-static {v3}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0

    .line 834
    .end local v3           #e:Ljava/lang/Exception;
    .restart local v2       #dbh:Lcom/melesta/engine/DatabaseHelper;
    .restart local v4       #me:Lcom/melesta/engine/EngineActivity;
    :cond_1
    :try_start_1
    new-instance v0, Landroid/app/backup/BackupManager;

    invoke-direct {v0, v4}, Landroid/app/backup/BackupManager;-><init>(Landroid/content/Context;)V

    .line 835
    .local v0, bm:Landroid/app/backup/BackupManager;
    invoke-virtual {v0}, Landroid/app/backup/BackupManager;->dataChanged()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1
.end method

.method private savePreference(Ljava/lang/String;J)V
    .locals 3
    .parameter "key"
    .parameter "value"

    .prologue
    .line 458
    const/4 v2, 0x0

    invoke-virtual {p0, v2}, Lcom/melesta/engine/EngineActivity;->getPreferences(I)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 459
    .local v1, sharedPreferences:Landroid/content/SharedPreferences;
    invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 460
    .local v0, editor:Landroid/content/SharedPreferences$Editor;
    invoke-interface {v0, p1, p2, p3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    .line 461
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 462
    return-void
.end method

.method private savePreference(Ljava/lang/String;Ljava/lang/String;)V
    .locals 3
    .parameter "key"
    .parameter "value"

    .prologue
    .line 465
    const/4 v2, 0x0

    invoke-virtual {p0, v2}, Lcom/melesta/engine/EngineActivity;->getPreferences(I)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 466
    .local v1, sharedPreferences:Landroid/content/SharedPreferences;
    invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 467
    .local v0, editor:Landroid/content/SharedPreferences$Editor;
    invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 468
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 469
    return-void
.end method

.method public static sendEmail(Ljava/lang/String;I)V
    .locals 35
    .parameter "xmlName"
    .parameter "id"

    .prologue
    .line 1268
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v18

    .line 1269
    .local v18, me:Lcom/melesta/engine/EngineActivity;
    invoke-virtual/range {v18 .. v18}, Lcom/melesta/engine/EngineActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v30

    invoke-virtual/range {v30 .. v30}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v22

    .line 1270
    .local v22, resources:Landroid/content/res/Resources;
    invoke-virtual/range {v18 .. v18}, Lcom/melesta/engine/EngineActivity;->getPackageName()Ljava/lang/String;

    move-result-object v21

    .line 1271
    .local v21, packageName:Ljava/lang/String;
    const-string v30, "xml"

    move-object/from16 v0, v22

    move-object/from16 v1, p0

    move-object/from16 v2, v30

    move-object/from16 v3, v21

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v29

    .line 1273
    .local v29, xmlId:I
    const-string v30, "engine"

    const-string v31, " Try to send %s(%d) %d"

    const/16 v32, 0x3

    move/from16 v0, v32

    new-array v0, v0, [Ljava/lang/Object;

    move-object/from16 v32, v0

    const/16 v33, 0x0

    aput-object p0, v32, v33

    const/16 v33, 0x1

    invoke-static/range {p1 .. p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v34

    aput-object v34, v32, v33

    const/16 v33, 0x2

    invoke-static/range {v29 .. v29}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v34

    aput-object v34, v32, v33

    invoke-static/range {v31 .. v32}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v31

    invoke-static/range {v30 .. v31}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 1274
    if-nez v29, :cond_0

    .line 1403
    .end local v18           #me:Lcom/melesta/engine/EngineActivity;
    .end local v21           #packageName:Ljava/lang/String;
    .end local v22           #resources:Landroid/content/res/Resources;
    .end local v29           #xmlId:I
    :goto_0
    return-void

    .line 1277
    .restart local v18       #me:Lcom/melesta/engine/EngineActivity;
    .restart local v21       #packageName:Ljava/lang/String;
    .restart local v22       #resources:Landroid/content/res/Resources;
    .restart local v29       #xmlId:I
    :cond_0
    const-string v4, ""

    .line 1278
    .local v4, address:Ljava/lang/String;
    const-string v26, ""

    .line 1279
    .local v26, subject:Ljava/lang/String;
    const-string v6, ""
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 1281
    .local v6, body:Ljava/lang/String;
    :try_start_1
    move-object/from16 v0, v22

    move/from16 v1, v29

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    move-result-object v20

    .line 1284
    .local v20, p:Landroid/content/res/XmlResourceParser;
    :try_start_2
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->next()I

    .line 1285
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->next()I

    .line 1286
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->next()I

    move-result v12

    .local v12, et:I
    :goto_1
    const/16 v30, 0x1

    move/from16 v0, v30

    if-eq v12, v0, :cond_5

    .line 1287
    const/16 v30, 0x2

    move/from16 v0, v30

    if-ne v12, v0, :cond_1

    .line 1288
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->getName()Ljava/lang/String;

    move-result-object v23

    .line 1290
    .local v23, s:Ljava/lang/String;
    const-string v30, "Address"

    move-object/from16 v0, v23

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v30

    if-eqz v30, :cond_2

    .line 1291
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->nextText()Ljava/lang/String;

    move-result-object v4

    .line 1286
    .end local v23           #s:Ljava/lang/String;
    :cond_1
    :goto_2
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->next()I

    move-result v12

    goto :goto_1

    .line 1292
    .restart local v23       #s:Ljava/lang/String;
    :cond_2
    const-string v30, "Subject"

    move-object/from16 v0, v23

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v30

    if-eqz v30, :cond_3

    .line 1293
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->nextText()Ljava/lang/String;

    move-result-object v26

    goto :goto_2

    .line 1294
    :cond_3
    const-string v30, "Body"

    move-object/from16 v0, v23

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v30

    if-eqz v30, :cond_4

    .line 1295
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->nextText()Ljava/lang/String;

    move-result-object v6

    goto :goto_2

    .line 1296
    :cond_4
    const-string v30, "Type"

    move-object/from16 v0, v23

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v30

    if-eqz v30, :cond_1

    .line 1297
    invoke-interface/range {v20 .. v20}, Landroid/content/res/XmlResourceParser;->nextText()Ljava/lang/String;

    move-result-object v28

    .line 1298
    .local v28, type:Ljava/lang/String;
    invoke-static/range {v28 .. v28}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v30

    invoke-static/range {v30 .. v30}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    .line 1299
    .local v17, i:Ljava/lang/Integer;
    if-eqz v17, :cond_1

    .line 1300
    invoke-virtual/range {v17 .. v17}, Ljava/lang/Integer;->intValue()I
    :try_end_2
    .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_2 .. :try_end_2} :catch_0
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    move-result p1

    goto :goto_2

    .line 1304
    .end local v12           #et:I
    .end local v17           #i:Ljava/lang/Integer;
    .end local v23           #s:Ljava/lang/String;
    .end local v28           #type:Ljava/lang/String;
    :catch_0
    move-exception v13

    .line 1305
    .local v13, ex:Lorg/xmlpull/v1/XmlPullParserException;
    :try_start_3
    const-string v30, "sendEmail"

    move-object/from16 v0, v30

    invoke-static {v0, v13}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_2

    .line 1312
    .end local v13           #ex:Lorg/xmlpull/v1/XmlPullParserException;
    :cond_5
    :try_start_4
    new-instance v24, Ljava/lang/StringBuilder;

    invoke-direct/range {v24 .. v24}, Ljava/lang/StringBuilder;-><init>()V

    .line 1313
    .local v24, sb:Ljava/lang/StringBuilder;
    invoke-static {}, Lcom/melesta/engine/EngineApp;->getAppId()Ljava/lang/String;

    move-result-object v30

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    const/16 v31, 0x20

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v30

    invoke-direct/range {v18 .. v18}, Lcom/melesta/engine/EngineActivity;->getSoftwareVersion()Ljava/lang/String;

    move-result-object v31

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    const-string v31, " ("

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    invoke-static {}, Lcom/melesta/engine/EngineApp;->getDeviceId()Ljava/lang/String;

    move-result-object v31

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    const/16 v31, 0x29

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    .line 1316
    const-string v30, "%s"

    move-object/from16 v0, v26

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v30

    if-eqz v30, :cond_6

    .line 1317
    const/16 v30, 0x1

    move/from16 v0, v30

    new-array v0, v0, [Ljava/lang/Object;

    move-object/from16 v30, v0

    const/16 v31, 0x0

    invoke-virtual/range {v24 .. v24}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v32

    aput-object v32, v30, v31

    move-object/from16 v0, v26

    move-object/from16 v1, v30

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v26

    .line 1320
    :cond_6
    invoke-virtual/range {v26 .. v26}, Ljava/lang/String;->isEmpty()Z

    move-result v30

    if-nez v30, :cond_7

    invoke-virtual {v6}, Ljava/lang/String;->isEmpty()Z

    move-result v30

    if-eqz v30, :cond_8

    .line 1321
    :cond_7
    const-string v30, "engine"

    const-string v31, "Error parsing mail xml"

    invoke-static/range {v30 .. v31}, Lcom/melesta/engine/Log;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 1324
    :cond_8
    move/from16 v0, p1

    move-object/from16 v1, v18

    iput v0, v1, Lcom/melesta/engine/EngineActivity;->mailId:I

    .line 1326
    const/4 v5, 0x0

    .line 1328
    .local v5, attachment:Ljava/lang/String;
    const-string v30, "support"

    move-object/from16 v0, p0

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v30

    if-eqz v30, :cond_a

    .line 1329
    new-instance v30, Ljava/lang/StringBuilder;

    invoke-direct/range {v30 .. v30}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v31

    invoke-virtual/range {v31 .. v31}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v31

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    const-string v31, "/temp/"

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    move-object/from16 v0, v30

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    invoke-virtual/range {v30 .. v30}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1

    move-result-object v25

    .line 1333
    .local v25, strFile:Ljava/lang/String;
    :try_start_5
    new-instance v15, Ljava/io/File;

    move-object/from16 v0, v25

    invoke-direct {v15, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 1334
    .local v15, file:Ljava/io/File;
    invoke-virtual {v15}, Ljava/io/File;->exists()Z

    move-result v30

    if-nez v30, :cond_9

    .line 1335
    invoke-virtual {v15}, Ljava/io/File;->mkdirs()Z

    .line 1337
    :cond_9
    const-string v30, ".md5"

    move-object/from16 v0, v21

    move-object/from16 v1, v30

    invoke-static {v0, v1, v15}, Ljava/io/File;->createTempFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;

    move-result-object v27

    .line 1338
    .local v27, ti:Ljava/io/File;
    invoke-virtual/range {v27 .. v27}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v5

    .line 1339
    new-instance v16, Ljava/io/FileOutputStream;

    move-object/from16 v0, v16

    move-object/from16 v1, v27

    invoke-direct {v0, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    .line 1340
    .local v16, fos:Ljava/io/FileOutputStream;
    new-instance v19, Ljava/io/DataOutputStream;

    move-object/from16 v0, v19

    move-object/from16 v1, v16

    invoke-direct {v0, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 1342
    .local v19, out:Ljava/io/DataOutputStream;
    invoke-virtual/range {v22 .. v22}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v8

    .line 1343
    .local v8, configuration:Landroid/content/res/Configuration;
    const/16 v30, 0x0

    invoke-virtual/range {v24 .. v24}, Ljava/lang/StringBuilder;->length()I

    move-result v31

    move-object/from16 v0, v24

    move/from16 v1, v30

    move/from16 v2, v31

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->delete(II)Ljava/lang/StringBuilder;

    .line 1345
    const-string v30, "CONFIGURATION:"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 1346
    invoke-virtual {v8}, Landroid/content/res/Configuration;->toString()Ljava/lang/String;

    move-result-object v30

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 1347
    invoke-virtual/range {v22 .. v22}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v10

    .line 1349
    .local v10, dm:Landroid/util/DisplayMetrics;
    iget v0, v10, Landroid/util/DisplayMetrics;->densityDpi:I

    move/from16 v30, v0

    const/16 v31, 0xf0

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_b

    .line 1350
    const-string v30, "\nDENSITY_HIGH\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 1361
    :goto_3
    iget v0, v8, Landroid/content/res/Configuration;->screenLayout:I

    move/from16 v30, v0

    and-int/lit8 v30, v30, 0xf

    const/16 v31, 0x3

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_f

    .line 1362
    const-string v30, "Large screen\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 1373
    :goto_4
    invoke-virtual/range {v24 .. v24}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v30

    invoke-virtual/range {v30 .. v30}, Ljava/lang/String;->getBytes()[B

    move-result-object v7

    .line 1374
    .local v7, buf:[B
    invoke-static {v7}, Lcom/melesta/engine/Cipher;->encryptWeak([B)[B

    move-result-object v7

    .line 1375
    move-object/from16 v0, v19

    invoke-static {v0, v7}, Lcom/melesta/engine/EngineActivity;->backupBytes(Ljava/io/DataOutputStream;[B)V

    .line 1377
    invoke-static/range {v18 .. v18}, Lcom/melesta/engine/DatabaseHelper;->getHelper(Landroid/content/Context;)Lcom/melesta/engine/DatabaseHelper;
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_3

    move-result-object v9

    .line 1378
    .local v9, dbh:Lcom/melesta/engine/DatabaseHelper;
    const/4 v7, 0x0

    .line 1380
    const/16 v30, 0x0

    :try_start_6
    move-object/from16 v0, v30

    invoke-static {v0, v9}, Lcom/melesta/engine/BackupAgent;->backupFiles(Landroid/app/backup/BackupDataOutput;Lcom/melesta/engine/DatabaseHelper;)[B
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_4

    move-result-object v7

    .line 1383
    :goto_5
    :try_start_7
    invoke-static {v7}, Lcom/melesta/engine/Cipher;->encryptWeak([B)[B

    move-result-object v7

    .line 1384
    move-object/from16 v0, v19

    invoke-static {v0, v7}, Lcom/melesta/engine/EngineActivity;->backupBytes(Ljava/io/DataOutputStream;[B)V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_3

    .line 1386
    const/4 v7, 0x0

    .line 1388
    const/16 v30, 0x0

    :try_start_8
    move-object/from16 v0, v30

    invoke-static {v0, v9}, Lcom/melesta/engine/BackupAgent;->backupTransactions(Landroid/app/backup/BackupDataOutput;Lcom/melesta/engine/DatabaseHelper;)[B
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_5

    move-result-object v7

    .line 1391
    :goto_6
    :try_start_9
    invoke-static {v7}, Lcom/melesta/engine/Cipher;->encryptWeak([B)[B

    move-result-object v7

    .line 1392
    move-object/from16 v0, v19

    invoke-static {v0, v7}, Lcom/melesta/engine/EngineActivity;->backupBytes(Ljava/io/DataOutputStream;[B)V
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_3

    .line 1399
    .end local v7           #buf:[B
    .end local v8           #configuration:Landroid/content/res/Configuration;
    .end local v9           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v10           #dm:Landroid/util/DisplayMetrics;
    .end local v15           #file:Ljava/io/File;
    .end local v16           #fos:Ljava/io/FileOutputStream;
    .end local v19           #out:Ljava/io/DataOutputStream;
    .end local v25           #strFile:Ljava/lang/String;
    .end local v27           #ti:Ljava/io/File;
    :cond_a
    :goto_7
    :try_start_a
    move-object/from16 v0, v26

    invoke-static {v4, v0, v6, v5}, Lcom/melesta/engine/EngineActivity;->sendEmail(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_a} :catch_1

    goto/16 :goto_0

    .line 1400
    .end local v4           #address:Ljava/lang/String;
    .end local v5           #attachment:Ljava/lang/String;
    .end local v6           #body:Ljava/lang/String;
    .end local v18           #me:Lcom/melesta/engine/EngineActivity;
    .end local v20           #p:Landroid/content/res/XmlResourceParser;
    .end local v21           #packageName:Ljava/lang/String;
    .end local v22           #resources:Landroid/content/res/Resources;
    .end local v24           #sb:Ljava/lang/StringBuilder;
    .end local v26           #subject:Ljava/lang/String;
    .end local v29           #xmlId:I
    :catch_1
    move-exception v14

    .line 1401
    .local v14, exc:Ljava/lang/Exception;
    const-string v30, "sendEmail"

    move-object/from16 v0, v30

    invoke-static {v0, v14}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_0

    .line 1307
    .end local v14           #exc:Ljava/lang/Exception;
    .restart local v4       #address:Ljava/lang/String;
    .restart local v6       #body:Ljava/lang/String;
    .restart local v18       #me:Lcom/melesta/engine/EngineActivity;
    .restart local v21       #packageName:Ljava/lang/String;
    .restart local v22       #resources:Landroid/content/res/Resources;
    .restart local v26       #subject:Ljava/lang/String;
    .restart local v29       #xmlId:I
    :catch_2
    move-exception v11

    .line 1308
    .local v11, e:Ljava/lang/Exception;
    :try_start_b
    const-string v30, "sendEmail"

    move-object/from16 v0, v30

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_1

    goto/16 :goto_0

    .line 1351
    .end local v11           #e:Ljava/lang/Exception;
    .restart local v5       #attachment:Ljava/lang/String;
    .restart local v8       #configuration:Landroid/content/res/Configuration;
    .restart local v10       #dm:Landroid/util/DisplayMetrics;
    .restart local v15       #file:Ljava/io/File;
    .restart local v16       #fos:Ljava/io/FileOutputStream;
    .restart local v19       #out:Ljava/io/DataOutputStream;
    .restart local v20       #p:Landroid/content/res/XmlResourceParser;
    .restart local v24       #sb:Ljava/lang/StringBuilder;
    .restart local v25       #strFile:Ljava/lang/String;
    .restart local v27       #ti:Ljava/io/File;
    :cond_b
    :try_start_c
    iget v0, v10, Landroid/util/DisplayMetrics;->densityDpi:I

    move/from16 v30, v0

    const/16 v31, 0x78

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_c

    .line 1352
    const-string v30, "\nDENSITY_LOW\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_c
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_c} :catch_3

    goto :goto_3

    .line 1394
    .end local v8           #configuration:Landroid/content/res/Configuration;
    .end local v10           #dm:Landroid/util/DisplayMetrics;
    .end local v15           #file:Ljava/io/File;
    .end local v16           #fos:Ljava/io/FileOutputStream;
    .end local v19           #out:Ljava/io/DataOutputStream;
    .end local v27           #ti:Ljava/io/File;
    :catch_3
    move-exception v11

    .line 1395
    .restart local v11       #e:Ljava/lang/Exception;
    :try_start_d
    invoke-static {v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_d .. :try_end_d} :catch_1

    goto :goto_7

    .line 1353
    .end local v11           #e:Ljava/lang/Exception;
    .restart local v8       #configuration:Landroid/content/res/Configuration;
    .restart local v10       #dm:Landroid/util/DisplayMetrics;
    .restart local v15       #file:Ljava/io/File;
    .restart local v16       #fos:Ljava/io/FileOutputStream;
    .restart local v19       #out:Ljava/io/DataOutputStream;
    .restart local v27       #ti:Ljava/io/File;
    :cond_c
    :try_start_e
    iget v0, v10, Landroid/util/DisplayMetrics;->densityDpi:I

    move/from16 v30, v0

    const/16 v31, 0xa0

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_d

    .line 1354
    const-string v30, "\nDENSITY_MEDIUM\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_3

    .line 1355
    :cond_d
    iget v0, v10, Landroid/util/DisplayMetrics;->densityDpi:I

    move/from16 v30, v0

    const/16 v31, 0x140

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_e

    .line 1356
    const-string v30, "\nDENSITY_XHIGH\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_3

    .line 1358
    :cond_e
    new-instance v30, Ljava/lang/StringBuilder;

    invoke-direct/range {v30 .. v30}, Ljava/lang/StringBuilder;-><init>()V

    const-string v31, "\nDENSITY_"

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    iget v0, v10, Landroid/util/DisplayMetrics;->densityDpi:I

    move/from16 v31, v0

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v30

    const-string v31, "\n"

    invoke-virtual/range {v30 .. v31}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v30

    invoke-virtual/range {v30 .. v30}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v30

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_3

    .line 1363
    :cond_f
    iget v0, v8, Landroid/content/res/Configuration;->screenLayout:I

    move/from16 v30, v0

    and-int/lit8 v30, v30, 0xf

    const/16 v31, 0x4

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_10

    .line 1364
    const-string v30, "xLarge screen\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_4

    .line 1365
    :cond_10
    iget v0, v8, Landroid/content/res/Configuration;->screenLayout:I

    move/from16 v30, v0

    and-int/lit8 v30, v30, 0xf

    const/16 v31, 0x2

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_11

    .line 1366
    const-string v30, "Normal screen\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_4

    .line 1367
    :cond_11
    iget v0, v8, Landroid/content/res/Configuration;->screenLayout:I

    move/from16 v30, v0

    and-int/lit8 v30, v30, 0xf

    const/16 v31, 0x1

    move/from16 v0, v30

    move/from16 v1, v31

    if-ne v0, v1, :cond_12

    .line 1368
    const-string v30, "Small screen\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_4

    .line 1370
    :cond_12
    const-string v30, "Unknown screen\n"

    move-object/from16 v0, v24

    move-object/from16 v1, v30

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_e
    .catch Ljava/lang/Exception; {:try_start_e .. :try_end_e} :catch_3

    goto/16 :goto_4

    .line 1381
    .restart local v7       #buf:[B
    .restart local v9       #dbh:Lcom/melesta/engine/DatabaseHelper;
    :catch_4
    move-exception v30

    goto/16 :goto_5

    .line 1389
    :catch_5
    move-exception v30

    goto/16 :goto_6
.end method

.method public static sendEmail(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 7
    .parameter "to"
    .parameter "subject"
    .parameter "body"
    .parameter "attachment"

    .prologue
    .line 1418
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    .line 1420
    .local v3, me:Lcom/melesta/engine/EngineActivity;
    new-instance v2, Landroid/content/Intent;

    const-string v4, "android.intent.action.SEND"

    invoke-direct {v2, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 1421
    .local v2, i:Landroid/content/Intent;
    const-string v4, "message/rfc822"

    invoke-virtual {v2, v4}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 1422
    const-string v4, "android.intent.extra.EMAIL"

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/String;

    const/4 v6, 0x0

    aput-object p0, v5, v6

    invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[Ljava/lang/String;)Landroid/content/Intent;

    .line 1423
    const-string v4, "android.intent.extra.SUBJECT"

    invoke-virtual {v2, v4, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 1424
    const-string v4, "android.intent.extra.TEXT"

    invoke-static {p2}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v5

    invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/CharSequence;)Landroid/content/Intent;

    .line 1426
    if-eqz p3, :cond_0

    .line 1427
    const-string v4, "android.intent.extra.STREAM"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "file://"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 1431
    :cond_0
    :try_start_1
    const-string v4, "Send mail..."

    invoke-static {v2, v4}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;

    move-result-object v4

    const/16 v5, 0x65

    invoke-virtual {v3, v4, v5}, Lcom/melesta/engine/EngineActivity;->startActivityForResult(Landroid/content/Intent;I)V
    :try_end_1
    .catch Landroid/content/ActivityNotFoundException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 1438
    .end local v2           #i:Landroid/content/Intent;
    .end local v3           #me:Lcom/melesta/engine/EngineActivity;
    :goto_0
    return-void

    .line 1432
    .restart local v2       #i:Landroid/content/Intent;
    .restart local v3       #me:Lcom/melesta/engine/EngineActivity;
    :catch_0
    move-exception v0

    .line 1433
    .local v0, ex:Landroid/content/ActivityNotFoundException;
    :try_start_2
    const-string v4, "There are no email clients installed."

    const/4 v5, 0x0

    invoke-static {v3, v4, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v4

    invoke-virtual {v4}, Landroid/widget/Toast;->show()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    goto :goto_0

    .line 1435
    .end local v0           #ex:Landroid/content/ActivityNotFoundException;
    .end local v2           #i:Landroid/content/Intent;
    .end local v3           #me:Lcom/melesta/engine/EngineActivity;
    :catch_1
    move-exception v1

    .line 1436
    .local v1, exc:Ljava/lang/Exception;
    const-string v4, "sendEmail"

    invoke-static {v4, v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static showAmazonGameCircleAchievements()V
    .locals 4

    .prologue
    .line 1931
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    iget-object v1, v3, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 1932
    .local v1, gameClient:Lcom/amazon/ags/api/AmazonGames;
    if-nez v1, :cond_0

    .line 1940
    :goto_0
    return-void

    .line 1935
    :cond_0
    invoke-interface {v1}, Lcom/amazon/ags/api/AmazonGames;->getAchievementsClient()Lcom/amazon/ags/api/achievements/AchievementsClient;

    move-result-object v2

    .line 1936
    .local v2, lbClient:Lcom/amazon/ags/api/achievements/AchievementsClient;
    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-interface {v2, v3}, Lcom/amazon/ags/api/achievements/AchievementsClient;->showAchievementsOverlay([Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1937
    .end local v2           #lbClient:Lcom/amazon/ags/api/achievements/AchievementsClient;
    :catch_0
    move-exception v0

    .line 1938
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static showAmazonGameCircleLeaderboard()V
    .locals 5

    .prologue
    .line 1782
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    iget-object v1, v3, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 1783
    .local v1, gameClient:Lcom/amazon/ags/api/AmazonGames;
    if-nez v1, :cond_0

    .line 1791
    :goto_0
    return-void

    .line 1786
    :cond_0
    invoke-interface {v1}, Lcom/amazon/ags/api/AmazonGames;->getLeaderboardsClient()Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;

    move-result-object v2

    .line 1787
    .local v2, leaderboardsClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    const/4 v3, 0x0

    const/4 v4, 0x0

    new-array v4, v4, [Ljava/lang/Object;

    invoke-interface {v2, v3, v4}, Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;->showLeaderboardOverlay(Ljava/lang/String;[Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1788
    .end local v2           #leaderboardsClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    :catch_0
    move-exception v0

    .line 1789
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static showAmazonGameCircleLeaderboard(Ljava/lang/String;)V
    .locals 4
    .parameter "leaderboardId"

    .prologue
    .line 1905
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v3

    iget-object v1, v3, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 1906
    .local v1, gameClient:Lcom/amazon/ags/api/AmazonGames;
    if-nez v1, :cond_0

    .line 1918
    .end local v1           #gameClient:Lcom/amazon/ags/api/AmazonGames;
    :goto_0
    return-void

    .line 1909
    .restart local v1       #gameClient:Lcom/amazon/ags/api/AmazonGames;
    :cond_0
    invoke-interface {v1}, Lcom/amazon/ags/api/AmazonGames;->getLeaderboardsClient()Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;

    move-result-object v2

    .line 1910
    .local v2, lbClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    if-eqz p0, :cond_1

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v3

    if-nez v3, :cond_2

    .line 1911
    :cond_1
    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-interface {v2, v3}, Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;->showLeaderboardsOverlay([Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1915
    .end local v1           #gameClient:Lcom/amazon/ags/api/AmazonGames;
    .end local v2           #lbClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    :catch_0
    move-exception v0

    .line 1916
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0

    .line 1913
    .end local v0           #e:Ljava/lang/Exception;
    .restart local v1       #gameClient:Lcom/amazon/ags/api/AmazonGames;
    .restart local v2       #lbClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    :cond_2
    const/4 v3, 0x0

    :try_start_1
    new-array v3, v3, [Ljava/lang/Object;

    invoke-interface {v2, p0, v3}, Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;->showLeaderboardOverlay(Ljava/lang/String;[Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method

.method public static showBackupManager()V
    .locals 4

    .prologue
    .line 1867
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v2

    iget-object v1, v2, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 1868
    .local v1, gameClient:Lcom/amazon/ags/api/AmazonGames;
    if-nez v1, :cond_0

    .line 1901
    :goto_0
    return-void

    .line 1871
    :cond_0
    invoke-interface {v1}, Lcom/amazon/ags/api/AmazonGames;->getWhisperSyncClient()Lcom/amazon/ags/api/whispersync/WhisperSyncClient;

    move-result-object v2

    new-instance v3, Lcom/melesta/engine/EngineActivity$16;

    invoke-direct {v3}, Lcom/melesta/engine/EngineActivity$16;-><init>()V

    invoke-interface {v2, v3}, Lcom/amazon/ags/api/whispersync/WhisperSyncClient;->requestRevert(Lcom/amazon/ags/api/whispersync/RevertBlobCallback;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1898
    :catch_0
    move-exception v0

    .line 1899
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static showBanner()V
    .locals 4

    .prologue
    .line 2063
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v2

    .line 2064
    .local v2, me:Lcom/melesta/engine/EngineActivity;
    if-nez v2, :cond_1

    .line 2089
    :cond_0
    :goto_0
    return-void

    .line 2067
    :cond_1
    iget-object v0, v2, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    .line 2068
    .local v0, banner:Lcom/burstly/lib/conveniencelayer/BurstlyAnimatedBanner;
    if-eqz v0, :cond_0

    .line 2071
    new-instance v3, Lcom/melesta/engine/EngineActivity$21;

    invoke-direct {v3, v2}, Lcom/melesta/engine/EngineActivity$21;-><init>(Lcom/melesta/engine/EngineActivity;)V

    invoke-virtual {v2, v3}, Lcom/melesta/engine/EngineActivity;->runOnUiThread(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 2086
    .end local v0           #banner:Lcom/burstly/lib/conveniencelayer/BurstlyAnimatedBanner;
    :catch_0
    move-exception v1

    .line 2087
    .local v1, e:Ljava/lang/Exception;
    invoke-static {v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method private showToast(Ljava/lang/String;)V
    .locals 3
    .parameter "message"

    .prologue
    .line 453
    const-string v0, "engine"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Toast:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 455
    return-void
.end method

.method private sponsorPayRequestCoins()V
    .locals 8

    .prologue
    .line 2146
    :try_start_0
    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    .line 2148
    .local v4, resources:Landroid/content/res/Resources;
    sget v6, Lcom/melesta/engine/R$string;->sponsorpay_currency_name_prefs_key:I

    invoke-virtual {v4, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 2150
    .local v1, currencyName:Ljava/lang/String;
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v0

    .line 2152
    .local v0, credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v6

    invoke-virtual {v0}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;->fetchLatestTransactionId(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 2155
    .local v5, usedTransactionId:Ljava/lang/String;
    new-instance v3, Lcom/melesta/engine/EngineActivity$23;

    invoke-direct {v3, p0, v5}, Lcom/melesta/engine/EngineActivity$23;-><init>(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;)V

    .line 2174
    .local v3, requestListener:Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;
    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v6

    invoke-static {v6, v3, v1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->requestNewCoins(Landroid/content/Context;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 2178
    .end local v0           #credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    .end local v1           #currencyName:Ljava/lang/String;
    .end local v3           #requestListener:Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;
    .end local v4           #resources:Landroid/content/res/Resources;
    .end local v5           #usedTransactionId:Ljava/lang/String;
    :goto_0
    return-void

    .line 2175
    :catch_0
    move-exception v2

    .line 2176
    .local v2, ex:Ljava/lang/Exception;
    const-string v6, "sponsorPayRequestNewCoins"

    invoke-static {v6, v2}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static sponsorPayRequestNewCoins()V
    .locals 3

    .prologue
    .line 2137
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    .line 2138
    .local v1, me:Lcom/melesta/engine/EngineActivity;
    invoke-direct {v1}, Lcom/melesta/engine/EngineActivity;->sponsorPayRequestCoins()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 2142
    :goto_0
    return-void

    .line 2139
    :catch_0
    move-exception v0

    .line 2140
    .local v0, ex:Ljava/lang/Exception;
    const-string v2, "sponsorPayRequestNewCoins"

    invoke-static {v2, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method private sponsorPaySaveCoins(D)V
    .locals 6
    .parameter "deltaOfCoins"

    .prologue
    .line 2182
    const/4 v3, 0x0

    :try_start_0
    invoke-virtual {p0, v3}, Lcom/melesta/engine/EngineActivity;->getPreferences(I)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 2183
    .local v2, sharedPreferences:Landroid/content/SharedPreferences;
    const-string v3, "SponsorPayCoins"

    const-wide/16 v4, 0x0

    invoke-interface {v2, v3, v4, v5}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v3

    long-to-int v3, v3

    double-to-int v4, p1

    add-int v0, v3, v4

    .line 2185
    .local v0, coins:I
    const-string v3, "SponsorPayCoins"

    int-to-long v4, v0

    invoke-direct {p0, v3, v4, v5}, Lcom/melesta/engine/EngineActivity;->savePreference(Ljava/lang/String;J)V

    .line 2187
    new-instance v3, Lcom/melesta/engine/EngineActivity$24;

    invoke-direct {v3, p0, v0, v2}, Lcom/melesta/engine/EngineActivity$24;-><init>(Lcom/melesta/engine/EngineActivity;ILandroid/content/SharedPreferences;)V

    invoke-virtual {p0, v3}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 2201
    .end local v0           #coins:I
    .end local v2           #sharedPreferences:Landroid/content/SharedPreferences;
    :goto_0
    return-void

    .line 2198
    :catch_0
    move-exception v1

    .line 2199
    .local v1, ex:Ljava/lang/Exception;
    const-string v3, "sponsorPaySaveCoins"

    invoke-static {v3, v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static sponsorPayShowOfferPage()V
    .locals 8

    .prologue
    .line 2120
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v2

    .line 2121
    .local v2, me:Lcom/melesta/engine/EngineActivity;
    invoke-virtual {v2}, Lcom/melesta/engine/EngineActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    .line 2123
    .local v3, resources:Landroid/content/res/Resources;
    const/4 v4, 0x0

    .line 2124
    .local v4, shouldStayOpen:Z
    sget v5, Lcom/melesta/engine/R$string;->sponsorpay_currency_name_prefs_key:I

    invoke-virtual {v3, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 2126
    .local v0, currencyName:Ljava/lang/String;
    invoke-virtual {v2}, Lcom/melesta/engine/EngineActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v5

    const/4 v6, 0x0

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v6

    const/4 v7, 0x0

    invoke-static {v5, v6, v0, v7}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForOfferWallActivity(Landroid/content/Context;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;

    move-result-object v5

    const/16 v6, 0xff

    invoke-virtual {v2, v5, v6}, Lcom/melesta/engine/EngineActivity;->startActivityForResult(Landroid/content/Intent;I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 2133
    .end local v0           #currencyName:Ljava/lang/String;
    .end local v3           #resources:Landroid/content/res/Resources;
    .end local v4           #shouldStayOpen:Z
    :goto_0
    return-void

    .line 2130
    :catch_0
    move-exception v1

    .line 2131
    .local v1, ex:Ljava/lang/Exception;
    const-string v5, "sponsorPayShowOfferPage"

    invoke-static {v5, v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method private static tapjoyProcessEarnedPoints(Lcom/tapjoy/TapjoyConnect;I)V
    .locals 5
    .parameter "tapjoy"
    .parameter "pointTotal"

    .prologue
    .line 1081
    if-gtz p1, :cond_1

    .line 1107
    :cond_0
    :goto_0
    return-void

    .line 1085
    :cond_1
    :try_start_0
    invoke-static {p1}, Lcom/melesta/engine/tapjoy/NativeDelegate;->OnEarnPoints(I)Z

    move-result v1

    .line 1086
    .local v1, spendPoints:Z
    const-string v2, "engine"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "[TapjoyDelegate] Update points: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 1088
    if-eqz v1, :cond_0

    .line 1091
    new-instance v2, Lcom/melesta/engine/EngineActivity$6;

    invoke-direct {v2}, Lcom/melesta/engine/EngineActivity$6;-><init>()V

    invoke-virtual {p0, p1, v2}, Lcom/tapjoy/TapjoyConnect;->spendTapPoints(ILcom/tapjoy/TapjoySpendPointsNotifier;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1104
    .end local v1           #spendPoints:Z
    :catch_0
    move-exception v0

    .line 1105
    .local v0, exc:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static declared-synchronized tapjoyRefreshEarnedCurrency()V
    .locals 3

    .prologue
    .line 1047
    const-class v2, Lcom/melesta/engine/EngineActivity;

    monitor-enter v2

    :try_start_0
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v0

    .line 1048
    .local v0, tapjoy:Lcom/tapjoy/TapjoyConnect;
    if-nez v0, :cond_1

    .line 1078
    :cond_0
    :goto_0
    monitor-exit v2

    return-void

    .line 1051
    :cond_1
    :try_start_1
    sget-boolean v1, Lcom/melesta/engine/EngineActivity;->mIsTapjoyRefreshEarnedCurrencyRequestRunning:Z

    if-nez v1, :cond_0

    .line 1054
    const/4 v1, 0x1

    sput-boolean v1, Lcom/melesta/engine/EngineActivity;->mIsTapjoyRefreshEarnedCurrencyRequestRunning:Z

    .line 1056
    new-instance v1, Lcom/melesta/engine/EngineActivity$5;

    invoke-direct {v1, v0}, Lcom/melesta/engine/EngineActivity$5;-><init>(Lcom/tapjoy/TapjoyConnect;)V

    invoke-virtual {v0, v1}, Lcom/tapjoy/TapjoyConnect;->getTapPoints(Lcom/tapjoy/TapjoyNotifier;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 1047
    :catchall_0
    move-exception v1

    monitor-exit v2

    throw v1
.end method

.method public static tapjoyShowOfferPage()V
    .locals 7

    .prologue
    .line 1024
    :try_start_0
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;

    move-result-object v4

    .line 1025
    .local v4, tapjoy:Lcom/tapjoy/TapjoyConnect;
    if-nez v4, :cond_1

    .line 1026
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v1

    .line 1027
    .local v1, me:Lcom/melesta/engine/EngineActivity;
    invoke-virtual {v1}, Lcom/melesta/engine/EngineActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    .line 1028
    .local v3, resources:Landroid/content/res/Resources;
    sget v6, Lcom/melesta/engine/R$string;->tapjoy_show_url_instead_of_ads:I

    invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    .line 1029
    .local v5, url:Ljava/lang/String;
    invoke-virtual {v5}, Ljava/lang/String;->isEmpty()Z

    move-result v6

    if-nez v6, :cond_0

    .line 1030
    invoke-virtual {v1}, Lcom/melesta/engine/EngineActivity;->getPackageName()Ljava/lang/String;

    move-result-object v2

    .line 1031
    .local v2, packageName:Ljava/lang/String;
    const-string v6, "[packagename]"

    invoke-virtual {v5, v6, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v5

    .line 1032
    invoke-static {v5}, Lcom/melesta/engine/EngineActivity;->openUrl(Ljava/lang/String;)V

    .line 1042
    .end local v1           #me:Lcom/melesta/engine/EngineActivity;
    .end local v2           #packageName:Ljava/lang/String;
    .end local v3           #resources:Landroid/content/res/Resources;
    .end local v5           #url:Ljava/lang/String;
    :cond_0
    :goto_0
    return-void

    .line 1037
    :cond_1
    invoke-virtual {v4}, Lcom/tapjoy/TapjoyConnect;->showOffers()V

    .line 1038
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->tapjoyRefreshEarnedCurrency()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1039
    :catch_0
    move-exception v0

    .line 1040
    .local v0, exc:Ljava/lang/Exception;
    const-string v6, "tapjoyShowOfferPage"

    invoke-static {v6, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public static updateAmazonGameCircleLeaderboard(Ljava/lang/String;I)V
    .locals 8
    .parameter "leaderboardId"
    .parameter "score"

    .prologue
    .line 1795
    :try_start_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v4

    iget-object v2, v4, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 1796
    .local v2, gameClient:Lcom/amazon/ags/api/AmazonGames;
    if-nez v2, :cond_1

    .line 1827
    .end local v2           #gameClient:Lcom/amazon/ags/api/AmazonGames;
    :cond_0
    :goto_0
    return-void

    .line 1799
    .restart local v2       #gameClient:Lcom/amazon/ags/api/AmazonGames;
    :cond_1
    invoke-interface {v2}, Lcom/amazon/ags/api/AmazonGames;->getLeaderboardsClient()Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;

    move-result-object v3

    .line 1800
    .local v3, lbClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    if-eqz v3, :cond_0

    .line 1803
    invoke-static {}, Lcom/melesta/engine/AwardsHelper;->getHelper()Lcom/melesta/engine/AwardsHelper;

    move-result-object v4

    invoke-virtual {v4, p0}, Lcom/melesta/engine/AwardsHelper;->getLeaderboardId(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 1804
    .local v0, amazonId:Ljava/lang/String;
    if-nez v0, :cond_2

    .line 1805
    const-string v4, "amazonGC"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "Can\'t find:"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1823
    .end local v0           #amazonId:Ljava/lang/String;
    .end local v2           #gameClient:Lcom/amazon/ags/api/AmazonGames;
    .end local v3           #lbClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    :catch_0
    move-exception v1

    .line 1824
    .local v1, e:Ljava/lang/Exception;
    invoke-static {v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0

    .line 1809
    .end local v1           #e:Ljava/lang/Exception;
    .restart local v0       #amazonId:Ljava/lang/String;
    .restart local v2       #gameClient:Lcom/amazon/ags/api/AmazonGames;
    .restart local v3       #lbClient:Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;
    :cond_2
    int-to-long v4, p1

    const/4 v6, 0x1

    :try_start_1
    new-array v6, v6, [Ljava/lang/Object;

    const/4 v7, 0x0

    aput-object p0, v6, v7

    invoke-interface {v3, v0, v4, v5, v6}, Lcom/amazon/ags/api/leaderboards/LeaderboardsClient;->submitScore(Ljava/lang/String;J[Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;

    move-result-object v4

    new-instance v5, Lcom/melesta/engine/EngineActivity$14;

    invoke-direct {v5, p0, v0}, Lcom/melesta/engine/EngineActivity$14;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v4, v5}, Lcom/amazon/ags/api/AGResponseHandle;->setCallback(Lcom/amazon/ags/api/AGResponseCallback;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method

.method public static updateAmazonGameCircleProgress(Ljava/lang/String;F)V
    .locals 9
    .parameter "id"
    .parameter "count"

    .prologue
    .line 1747
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v6

    iget-object v3, v6, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 1748
    .local v3, gameClient:Lcom/amazon/ags/api/AmazonGames;
    if-nez v3, :cond_0

    .line 1778
    :goto_0
    return-void

    .line 1752
    :cond_0
    :try_start_0
    invoke-interface {v3}, Lcom/amazon/ags/api/AmazonGames;->getAchievementsClient()Lcom/amazon/ags/api/achievements/AchievementsClient;

    move-result-object v0

    .line 1753
    .local v0, acClient:Lcom/amazon/ags/api/achievements/AchievementsClient;
    invoke-static {}, Lcom/melesta/engine/AwardsHelper;->getHelper()Lcom/melesta/engine/AwardsHelper;

    move-result-object v6

    invoke-virtual {v6, p0}, Lcom/melesta/engine/AwardsHelper;->getAchievementId(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 1754
    .local v1, amazonId:Ljava/lang/String;
    if-nez v1, :cond_1

    .line 1755
    const-string v6, "amazonGC"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "Can\'t find:"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 1775
    .end local v0           #acClient:Lcom/amazon/ags/api/achievements/AchievementsClient;
    .end local v1           #amazonId:Ljava/lang/String;
    :catch_0
    move-exception v2

    .line 1776
    .local v2, e:Ljava/lang/Exception;
    invoke-static {v2}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V

    goto :goto_0

    .line 1758
    .end local v2           #e:Ljava/lang/Exception;
    .restart local v0       #acClient:Lcom/amazon/ags/api/achievements/AchievementsClient;
    .restart local v1       #amazonId:Ljava/lang/String;
    :cond_1
    :try_start_1
    invoke-interface {v3}, Lcom/amazon/ags/api/AmazonGames;->isReady()Z

    move-result v4

    .line 1759
    .local v4, ready:Z
    const/4 v6, 0x1

    new-array v6, v6, [Ljava/lang/Object;

    const/4 v7, 0x0

    aput-object p0, v6, v7

    invoke-interface {v0, v1, p1, v6}, Lcom/amazon/ags/api/achievements/AchievementsClient;->updateProgress(Ljava/lang/String;F[Ljava/lang/Object;)Lcom/amazon/ags/api/AGResponseHandle;

    move-result-object v5

    .line 1760
    .local v5, rh:Lcom/amazon/ags/api/AGResponseHandle;,"Lcom/amazon/ags/api/AGResponseHandle<Lcom/amazon/ags/api/achievements/UpdateProgressResponse;>;"
    new-instance v6, Lcom/melesta/engine/EngineActivity$13;

    invoke-direct {v6, p0, v1, p1, v4}, Lcom/melesta/engine/EngineActivity$13;-><init>(Ljava/lang/String;Ljava/lang/String;FZ)V

    invoke-interface {v5, v6}, Lcom/amazon/ags/api/AGResponseHandle;->setCallback(Lcom/amazon/ags/api/AGResponseCallback;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method


# virtual methods
.method public addTickListener(Lcom/melesta/engine/EngineActivity$ActivityTickListener;)V
    .locals 3
    .parameter "listener"

    .prologue
    .line 352
    :try_start_0
    iget-object v2, p0, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    monitor-enter v2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 353
    :try_start_1
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 354
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 355
    :cond_0
    monitor-exit v2

    .line 359
    :goto_0
    return-void

    .line 355
    :catchall_0
    move-exception v1

    monitor-exit v2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :try_start_2
    throw v1
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    .line 356
    :catch_0
    move-exception v0

    .line 357
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "addListener"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public earnedTapPoints(I)V
    .locals 1
    .parameter "amount"

    .prologue
    .line 1111
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;

    move-result-object v0

    .line 1112
    .local v0, tapjoy:Lcom/tapjoy/TapjoyConnect;
    if-nez v0, :cond_0

    .line 1118
    :goto_0
    return-void

    .line 1116
    :cond_0
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->tapjoyRefreshEarnedCurrency()V

    goto :goto_0
.end method

.method public getHandler()Landroid/os/Handler;
    .locals 1

    .prologue
    .line 1943
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method public init()V
    .locals 14

    .prologue
    const/4 v13, -0x1

    const/4 v12, -0x2

    const/4 v11, 0x0

    .line 680
    sget v8, Lcom/melesta/engine/R$layout;->game:I

    invoke-virtual {p0, v8}, Lcom/melesta/engine/EngineActivity;->setContentView(I)V

    .line 682
    sget v8, Lcom/melesta/engine/R$id;->game_root_layout:I

    invoke-virtual {p0, v8}, Lcom/melesta/engine/EngineActivity;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/RelativeLayout;

    iput-object v8, p0, Lcom/melesta/engine/EngineActivity;->mFramelayout:Landroid/widget/RelativeLayout;

    .line 685
    sget v8, Lcom/melesta/engine/R$id;->engineEditText:I

    invoke-virtual {p0, v8}, Lcom/melesta/engine/EngineActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Lcom/melesta/engine/EngineEditText;

    .line 688
    .local v3, edittext:Lcom/melesta/engine/EngineEditText;
    :try_start_0
    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    .line 689
    .local v7, resources:Landroid/content/res/Resources;
    sget v8, Lcom/melesta/engine/R$string;->burstly_app_id:I

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 690
    .local v0, burstly_app_id:Ljava/lang/String;
    sget v8, Lcom/melesta/engine/R$string;->burstly_zone_id:I

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 691
    .local v1, burstly_zone_id:Ljava/lang/String;
    invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z

    move-result v8

    if-nez v8, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z

    move-result v8

    if-nez v8, :cond_0

    .line 693
    invoke-static {p0, v0}, Lcom/burstly/lib/conveniencelayer/Burstly;->init(Landroid/content/Context;Ljava/lang/String;)V

    .line 696
    new-instance v8, Lcom/melesta/ads/BurstlyAnimatedBanner;

    sget v9, Lcom/melesta/engine/R$id;->burstly_bannerview:I

    const/4 v10, 0x1

    invoke-direct {v8, p0, v9, v10}, Lcom/melesta/ads/BurstlyAnimatedBanner;-><init>(Landroid/app/Activity;IZ)V

    iput-object v8, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    .line 698
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    new-instance v9, Lcom/melesta/engine/MyBurstlyListener;

    invoke-direct {v9}, Lcom/melesta/engine/MyBurstlyListener;-><init>()V

    invoke-virtual {v8, v9}, Lcom/melesta/ads/BurstlyAnimatedBanner;->addBurstlyListener(Lcom/burstly/lib/conveniencelayer/IBurstlyListener;)V

    .line 699
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    invoke-virtual {v8, v1}, Lcom/melesta/ads/BurstlyAnimatedBanner;->setZoneId(Ljava/lang/String;)V

    .line 701
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    invoke-virtual {v8}, Lcom/melesta/ads/BurstlyAnimatedBanner;->showAd()V

    .line 702
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->hideBanner()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 709
    .end local v0           #burstly_app_id:Ljava/lang/String;
    .end local v1           #burstly_zone_id:Ljava/lang/String;
    .end local v7           #resources:Landroid/content/res/Resources;
    :cond_0
    :goto_0
    sget v8, Lcom/melesta/engine/R$id;->engine_game_view:I

    invoke-virtual {p0, v8}, Lcom/melesta/engine/EngineActivity;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Lcom/melesta/engine/EngineGLSurfaceView;

    iput-object v8, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    .line 714
    new-instance v8, Lcom/melesta/engine/Renderer;

    invoke-direct {v8}, Lcom/melesta/engine/Renderer;-><init>()V

    iput-object v8, p0, Lcom/melesta/engine/EngineActivity;->mRenderer:Lcom/melesta/engine/Renderer;

    .line 715
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    iget-object v9, p0, Lcom/melesta/engine/EngineActivity;->mRenderer:Lcom/melesta/engine/Renderer;

    invoke-virtual {v8, v9}, Lcom/melesta/engine/EngineGLSurfaceView;->setEngineRenderer(Lcom/melesta/engine/Renderer;)V

    .line 716
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-virtual {v8, v3}, Lcom/melesta/engine/EngineGLSurfaceView;->setCocos2dxEditText(Lcom/melesta/engine/EngineEditText;)V

    .line 719
    new-instance v5, Landroid/view/ViewGroup$LayoutParams;

    invoke-direct {v5, v13, v13}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    .line 721
    .local v5, progress_framelayout_params:Landroid/view/ViewGroup$LayoutParams;
    new-instance v8, Landroid/widget/RelativeLayout;

    invoke-direct {v8, p0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iput-object v8, p0, Lcom/melesta/engine/EngineActivity;->mProgressFramelayout:Landroid/widget/RelativeLayout;

    .line 722
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mProgressFramelayout:Landroid/widget/RelativeLayout;

    invoke-virtual {v8, v5}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 723
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mProgressFramelayout:Landroid/widget/RelativeLayout;

    const/16 v9, 0x7f

    invoke-static {v9, v11, v11, v11}, Landroid/graphics/Color;->argb(IIII)I

    move-result v9

    invoke-virtual {v8, v9}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    .line 725
    new-instance v6, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v6, v12, v12}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 727
    .local v6, progress_layout_params:Landroid/widget/RelativeLayout$LayoutParams;
    const/16 v8, 0xd

    invoke-virtual {v6, v8}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 728
    new-instance v4, Landroid/widget/ProgressBar;

    invoke-direct {v4, p0}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;)V

    .line 729
    .local v4, pb:Landroid/widget/ProgressBar;
    invoke-virtual {v4, v6}, Landroid/widget/ProgressBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 731
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mProgressFramelayout:Landroid/widget/RelativeLayout;

    invoke-virtual {v8, v4}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    .line 737
    iget-object v8, p0, Lcom/melesta/engine/EngineActivity;->mFramelayout:Landroid/widget/RelativeLayout;

    invoke-virtual {p0, v8}, Lcom/melesta/engine/EngineActivity;->setContentView(Landroid/view/View;)V

    .line 738
    return-void

    .line 704
    .end local v4           #pb:Landroid/widget/ProgressBar;
    .end local v5           #progress_framelayout_params:Landroid/view/ViewGroup$LayoutParams;
    .end local v6           #progress_layout_params:Landroid/widget/RelativeLayout$LayoutParams;
    :catch_0
    move-exception v2

    .line 705
    .local v2, e:Ljava/lang/Exception;
    const-string v8, "initBurstly"

    invoke-static {v8, v2}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public onActivityResult(IILandroid/content/Intent;)V
    .locals 5
    .parameter "requestCode"
    .parameter "resultCode"
    .parameter "data"

    .prologue
    .line 947
    :try_start_0
    invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V

    .line 949
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    invoke-virtual {v1, p1, p2, p3}, Lcom/facebook/UiLifecycleHelper;->onActivityResult(IILandroid/content/Intent;)V

    .line 951
    const/16 v1, 0x65

    if-ne p1, v1, :cond_0

    .line 952
    const-string v1, "engine"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "mail closed = "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 954
    new-instance v1, Lcom/melesta/engine/EngineActivity$4;

    invoke-direct {v1, p0, p2}, Lcom/melesta/engine/EngineActivity$4;-><init>(Lcom/melesta/engine/EngineActivity;I)V

    invoke-virtual {p0, v1}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    .line 967
    :goto_0
    return-void

    .line 962
    :cond_0
    invoke-direct {p0, p1, p2, p3}, Lcom/melesta/engine/EngineActivity;->fireActivityResult(IILandroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 964
    :catch_0
    move-exception v0

    .line 965
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "onActivityResult(%d,%d)"

    const/4 v2, 0x2

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x1

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public onBackPressed()V
    .locals 1

    .prologue
    .line 938
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    invoke-virtual {v0}, Lcom/chartboost/sdk/Chartboost;->onBackPressed()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 942
    :goto_0
    return-void

    .line 941
    :cond_0
    invoke-super {p0}, Landroid/app/Activity;->onBackPressed()V

    goto :goto_0
.end method

.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
    .locals 0
    .parameter "newConfig"

    .prologue
    .line 423
    invoke-super {p0, p1}, Landroid/app/Activity;->onConfigurationChanged(Landroid/content/res/Configuration;)V

    .line 424
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 40
    .parameter "savedInstanceState"

    .prologue
    .line 473
    const-string v36, "engine"

    new-instance v37, Ljava/lang/StringBuilder;

    invoke-direct/range {v37 .. v37}, Ljava/lang/StringBuilder;-><init>()V

    const-string v38, "onCreate() "

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getIntent()Landroid/content/Intent;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getIntent()Landroid/content/Intent;

    move-result-object v38

    invoke-virtual/range {v38 .. v38}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v37 .. v37}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v37

    invoke-static/range {v36 .. v37}, Lcom/melesta/engine/Log;->v(Ljava/lang/String;Ljava/lang/String;)V

    .line 474
    invoke-super/range {p0 .. p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 475
    sput-object p0, Lcom/melesta/engine/EngineActivity;->instance:Lcom/melesta/engine/EngineActivity;

    .line 478
    const/16 v36, 0x0

    :try_start_0
    move-object/from16 v0, p0

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->getPreferences(I)Landroid/content/SharedPreferences;

    move-result-object v26

    .line 479
    .local v26, sharedPreferences:Landroid/content/SharedPreferences;
    const-string v36, "BackupTime"

    const-wide/16 v37, -0x1

    move-object/from16 v0, v26

    move-object/from16 v1, v36

    move-wide/from16 v2, v37

    invoke-interface {v0, v1, v2, v3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v36

    move-wide/from16 v0, v36

    move-object/from16 v2, p0

    iput-wide v0, v2, Lcom/melesta/engine/EngineActivity;->mLastBackupTime:J

    .line 480
    const-string v36, "BackupName"

    const-string v37, ""

    move-object/from16 v0, v26

    move-object/from16 v1, v36

    move-object/from16 v2, v37

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mLastBackupName:Ljava/lang/String;

    .line 482
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v36

    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getPackageName()Ljava/lang/String;

    move-result-object v37

    const/16 v38, 0x40

    invoke-virtual/range {v36 .. v38}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v36

    move-object/from16 v0, v36

    iget-object v0, v0, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;

    move-object/from16 v28, v0

    .line 484
    .local v28, sigs:[Landroid/content/pm/Signature;
    move-object/from16 v5, v28

    .local v5, arr$:[Landroid/content/pm/Signature;
    array-length v0, v5

    move/from16 v16, v0

    .local v16, len$:I
    const/4 v14, 0x0

    .local v14, i$:I
    :goto_0
    move/from16 v0, v16

    if-ge v14, v0, :cond_0

    aget-object v27, v5, v14

    .line 485
    .local v27, sig:Landroid/content/pm/Signature;
    const-string v36, "MyApp"

    new-instance v37, Ljava/lang/StringBuilder;

    invoke-direct/range {v37 .. v37}, Ljava/lang/StringBuilder;-><init>()V

    const-string v38, "Signature hashcode : "

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v27 .. v27}, Landroid/content/pm/Signature;->toCharsString()Ljava/lang/String;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v37 .. v37}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v37

    invoke-static/range {v36 .. v37}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 487
    const-string v36, "SHA"

    invoke-static/range {v36 .. v36}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;

    move-result-object v17

    .line 488
    .local v17, md:Ljava/security/MessageDigest;
    invoke-virtual/range {v27 .. v27}, Landroid/content/pm/Signature;->toByteArray()[B

    move-result-object v36

    move-object/from16 v0, v17

    move-object/from16 v1, v36

    invoke-virtual {v0, v1}, Ljava/security/MessageDigest;->update([B)V

    .line 489
    const-string v36, "engine"

    new-instance v37, Ljava/lang/StringBuilder;

    invoke-direct/range {v37 .. v37}, Ljava/lang/StringBuilder;-><init>()V

    const-string v38, "Signature hashcode : "

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v17 .. v17}, Ljava/security/MessageDigest;->digest()[B

    move-result-object v38

    const/16 v39, 0x0

    invoke-static/range {v38 .. v39}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v37 .. v37}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v37

    invoke-static/range {v36 .. v37}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 484
    add-int/lit8 v14, v14, 0x1

    goto :goto_0

    .line 492
    .end local v17           #md:Ljava/security/MessageDigest;
    .end local v27           #sig:Landroid/content/pm/Signature;
    :cond_0
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getWindow()Landroid/view/Window;

    move-result-object v36

    const/16 v37, 0x80

    invoke-virtual/range {v36 .. v37}, Landroid/view/Window;->addFlags(I)V

    .line 494
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v24

    .line 495
    .local v24, resources:Landroid/content/res/Resources;
    invoke-virtual/range {v24 .. v24}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v9

    .line 496
    .local v9, configuration:Landroid/content/res/Configuration;
    iget-object v0, v9, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    move-object/from16 v36, v0

    invoke-virtual/range {v36 .. v36}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mLanguage:Ljava/lang/String;

    .line 497
    const-string v36, "engine"

    new-instance v37, Ljava/lang/StringBuilder;

    invoke-direct/range {v37 .. v37}, Ljava/lang/StringBuilder;-><init>()V

    const-string v38, "Language:"

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mLanguage:Ljava/lang/String;

    move-object/from16 v38, v0

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    const-string v38, "  "

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    iget-object v0, v9, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    move-object/from16 v38, v0

    invoke-virtual/range {v38 .. v38}, Ljava/util/Locale;->getISO3Language()Ljava/lang/String;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v37 .. v37}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v37

    invoke-static/range {v36 .. v37}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 498
    const-string v36, "engine"

    new-instance v37, Ljava/lang/StringBuilder;

    invoke-direct/range {v37 .. v37}, Ljava/lang/StringBuilder;-><init>()V

    const-string v38, "Country:"

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    iget-object v0, v9, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    move-object/from16 v38, v0

    invoke-virtual/range {v38 .. v38}, Ljava/util/Locale;->getISO3Country()Ljava/lang/String;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    const-string v38, "  "

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    iget-object v0, v9, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    move-object/from16 v38, v0

    invoke-virtual/range {v38 .. v38}, Ljava/util/Locale;->getCountry()Ljava/lang/String;

    move-result-object v38

    invoke-virtual/range {v37 .. v38}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v37

    invoke-virtual/range {v37 .. v37}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v37

    invoke-static/range {v36 .. v37}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 501
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mLanguage:Ljava/lang/String;

    move-object/from16 v36, v0

    const-string v37, "zh"

    invoke-virtual/range {v36 .. v37}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v36

    if-eqz v36, :cond_1

    iget-object v0, v9, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    move-object/from16 v36, v0

    invoke-virtual/range {v36 .. v36}, Ljava/util/Locale;->getCountry()Ljava/lang/String;

    move-result-object v36

    const-string v37, "cn"

    invoke-virtual/range {v36 .. v37}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v36

    if-eqz v36, :cond_1

    .line 502
    const-string v36, "zh-hans"

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mLanguage:Ljava/lang/String;

    .line 505
    :cond_1
    invoke-static/range {p0 .. p0}, Lcom/melesta/engine/DatabaseHelper;->getHelper(Landroid/content/Context;)Lcom/melesta/engine/DatabaseHelper;

    move-result-object v10

    .line 506
    .local v10, dbh:Lcom/melesta/engine/DatabaseHelper;
    const/16 v36, 0x0

    move/from16 v0, v36

    invoke-virtual {v10, v0}, Lcom/melesta/engine/DatabaseHelper;->getFilesList(Z)Ljava/util/List;

    move-result-object v36

    invoke-interface/range {v36 .. v36}, Ljava/util/List;->size()I

    move-result v36

    if-nez v36, :cond_e

    const/4 v15, 0x1

    .line 508
    .local v15, isNewUser:Z
    :goto_1
    sget-boolean v36, Lcom/melesta/engine/Log;->isDebug:Z

    if-eqz v36, :cond_f

    sget v20, Lcom/melesta/engine/R$string;->promo_code_debug_url:I

    .line 509
    .local v20, promo_res_id:I
    :goto_2
    move-object/from16 v0, p0

    move/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->getString(I)Ljava/lang/String;

    move-result-object v36

    sput-object v36, Lcom/melesta/engine/EngineActivity;->mPromoCodeUrl:Ljava/lang/String;

    .line 511
    sget-object v36, Lcom/facebook/LoggingBehavior;->INCLUDE_ACCESS_TOKENS:Lcom/facebook/LoggingBehavior;

    invoke-static/range {v36 .. v36}, Lcom/facebook/Settings;->addLoggingBehavior(Lcom/facebook/LoggingBehavior;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 515
    :try_start_1
    new-instance v36, Lcom/facebook/UiLifecycleHelper;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->facebookStatusCallback:Lcom/facebook/Session$StatusCallback;

    move-object/from16 v37, v0

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    move-object/from16 v2, v37

    invoke-direct {v0, v1, v2}, Lcom/facebook/UiLifecycleHelper;-><init>(Landroid/app/Activity;Lcom/facebook/Session$StatusCallback;)V

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    .line 517
    invoke-static {}, Lcom/facebook/Session;->getActiveSession()Lcom/facebook/Session;

    move-result-object v25

    .line 518
    .local v25, session:Lcom/facebook/Session;
    if-eqz v25, :cond_2

    invoke-virtual/range {v25 .. v25}, Lcom/facebook/Session;->getPermissions()Ljava/util/List;

    move-result-object v36

    sget-object v37, Lcom/melesta/engine/FacebookOperations;->READ_PERMISSIONS:Ljava/util/List;

    invoke-interface/range {v36 .. v37}, Ljava/util/List;->containsAll(Ljava/util/Collection;)Z

    move-result v36

    if-nez v36, :cond_4

    .line 519
    :cond_2
    if-eqz p1, :cond_3

    .line 520
    const/16 v36, 0x0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->facebookStatusCallback:Lcom/facebook/Session$StatusCallback;

    move-object/from16 v37, v0

    move-object/from16 v0, p0

    move-object/from16 v1, v36

    move-object/from16 v2, v37

    move-object/from16 v3, p1

    invoke-static {v0, v1, v2, v3}, Lcom/facebook/Session;->restoreSession(Landroid/content/Context;Lcom/facebook/TokenCachingStrategy;Lcom/facebook/Session$StatusCallback;Landroid/os/Bundle;)Lcom/facebook/Session;

    move-result-object v25

    .line 522
    :cond_3
    invoke-static/range {v25 .. v25}, Lcom/facebook/Session;->setActiveSession(Lcom/facebook/Session;)V

    .line 525
    :cond_4
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    move-object/from16 v36, v0

    move-object/from16 v0, v36

    move-object/from16 v1, p1

    invoke-virtual {v0, v1}, Lcom/facebook/UiLifecycleHelper;->onCreate(Landroid/os/Bundle;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 530
    .end local v25           #session:Lcom/facebook/Session;
    :goto_3
    :try_start_2
    sget v36, Lcom/melesta/engine/R$string;->flurry_api_key:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mFlurryApiKey:Ljava/lang/String;

    .line 532
    sget v36, Lcom/melesta/engine/R$string;->tapjoy_app_id:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v33

    .line 533
    .local v33, tapjoyAppId:Ljava/lang/String;
    sget v36, Lcom/melesta/engine/R$string;->tapjoy_secret_key:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v34

    .line 535
    .local v34, tapjoySecretKey:Ljava/lang/String;
    sget v36, Lcom/melesta/engine/R$string;->sponsorpay_app_id_prefs_key:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v29

    .line 536
    .local v29, sponsorpayAppIdPrefsKey:Ljava/lang/String;
    if-eqz v29, :cond_5

    invoke-virtual/range {v29 .. v29}, Ljava/lang/String;->isEmpty()Z

    move-result v36

    if-nez v36, :cond_5

    .line 537
    sget v36, Lcom/melesta/engine/R$string;->sponsorpay_user_id_prefs_key:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v31

    .line 538
    .local v31, sponsorpayUserIdPrefsKey:Ljava/lang/String;
    sget v36, Lcom/melesta/engine/R$string;->sponsorpay_security_token_prefs_key:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    move-result-object v30

    .line 542
    .local v30, sponsorpaySecurityTokenPrefsKey:Ljava/lang/String;
    :try_start_3
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v36

    move-object/from16 v0, v29

    move-object/from16 v1, v31

    move-object/from16 v2, v30

    move-object/from16 v3, v36

    invoke-static {v0, v1, v2, v3}, Lcom/sponsorpay/sdk/android/SponsorPay;->start(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;
    :try_end_3
    .catch Ljava/lang/RuntimeException; {:try_start_3 .. :try_end_3} :catch_2
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    .line 551
    .end local v30           #sponsorpaySecurityTokenPrefsKey:Ljava/lang/String;
    .end local v31           #sponsorpayUserIdPrefsKey:Ljava/lang/String;
    :cond_5
    :goto_4
    :try_start_4
    sget v36, Lcom/melesta/engine/R$string;->amazon_game_circle_enabled:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v12

    .line 552
    .local v12, egc:Ljava/lang/String;
    const-string v36, "1"

    move-object/from16 v0, v36

    invoke-virtual {v12, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v36

    move/from16 v0, v36

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    .line 556
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    move/from16 v36, v0

    if-eqz v36, :cond_6

    .line 557
    sget-object v36, Lcom/amazon/ags/api/AmazonGamesFeature;->Achievements:Lcom/amazon/ags/api/AmazonGamesFeature;

    invoke-static/range {v36 .. v36}, Ljava/util/EnumSet;->of(Ljava/lang/Enum;)Ljava/util/EnumSet;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    .line 558
    sget v36, Lcom/melesta/engine/R$string;->amazon_game_circle_leaderbords_enabled:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v36

    const-string v37, "1"

    invoke-virtual/range {v36 .. v37}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    .line 560
    .local v4, agcLeaderboardEnabled:Z
    if-eqz v4, :cond_6

    .line 561
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    move-object/from16 v36, v0

    sget-object v37, Lcom/amazon/ags/api/AmazonGamesFeature;->Leaderboards:Lcom/amazon/ags/api/AmazonGamesFeature;

    invoke-virtual/range {v36 .. v37}, Ljava/util/EnumSet;->add(Ljava/lang/Object;)Z

    .line 564
    .end local v4           #agcLeaderboardEnabled:Z
    :cond_6
    sget v36, Lcom/melesta/engine/R$string;->amazon_whispersync_enabled:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v12

    .line 565
    const-string v36, "1"

    move-object/from16 v0, v36

    invoke-virtual {v12, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v36

    if-eqz v36, :cond_7

    .line 566
    const/16 v36, 0x1

    move/from16 v0, v36

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    .line 567
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    move-object/from16 v36, v0

    if-nez v36, :cond_10

    .line 568
    sget-object v36, Lcom/amazon/ags/api/AmazonGamesFeature;->Whispersync:Lcom/amazon/ags/api/AmazonGamesFeature;

    invoke-static/range {v36 .. v36}, Ljava/util/EnumSet;->of(Ljava/lang/Enum;)Ljava/util/EnumSet;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    .line 573
    :cond_7
    :goto_5
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/melesta/engine/EngineActivity;->agcEnabled:Z

    move/from16 v36, v0

    if-eqz v36, :cond_8

    .line 574
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getApplication()Landroid/app/Application;

    move-result-object v36

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->agsGameCallback:Lcom/amazon/ags/api/AmazonGamesCallback;

    move-object/from16 v37, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    move-object/from16 v38, v0

    invoke-static/range {v36 .. v38}, Lcom/amazon/ags/api/AmazonGamesClient;->initialize(Landroid/app/Application;Lcom/amazon/ags/api/AmazonGamesCallback;Ljava/util/EnumSet;)Lcom/amazon/ags/api/AmazonGames;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->agsGameClient:Lcom/amazon/ags/api/AmazonGames;

    .line 576
    sget v36, Lcom/melesta/engine/R$raw;->awards:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;

    move-result-object v6

    .line 577
    .local v6, awardsConfig:Ljava/io/InputStream;
    invoke-static {}, Lcom/melesta/engine/AwardsHelper;->getHelper()Lcom/melesta/engine/AwardsHelper;

    move-result-object v36

    move-object/from16 v0, v36

    invoke-virtual {v0, v6}, Lcom/melesta/engine/AwardsHelper;->loadConfig(Ljava/io/InputStream;)V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3

    .line 584
    .end local v6           #awardsConfig:Ljava/io/InputStream;
    .end local v12           #egc:Ljava/lang/String;
    :cond_8
    :goto_6
    :try_start_5
    sget v36, Lcom/melesta/engine/R$string;->chartboost_app_id:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v7

    .line 585
    .local v7, chartBoostAppId:Ljava/lang/String;
    sget v36, Lcom/melesta/engine/R$string;->chartboost_signature:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 588
    .local v8, chartBoostSignature:Ljava/lang/String;
    invoke-static {}, Lcom/chartboost/sdk/Chartboost;->sharedChartboost()Lcom/chartboost/sdk/Chartboost;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    .line 589
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    move-object/from16 v36, v0

    const/16 v37, 0x0

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    move-object/from16 v2, v37

    invoke-virtual {v0, v1, v7, v8, v2}, Lcom/chartboost/sdk/Chartboost;->onCreate(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;Lcom/chartboost/sdk/ChartboostDelegate;)V

    .line 592
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    move-object/from16 v36, v0

    invoke-virtual/range {v36 .. v36}, Lcom/chartboost/sdk/Chartboost;->startSession()V

    .line 594
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    move-object/from16 v36, v0

    invoke-virtual/range {v36 .. v36}, Lcom/chartboost/sdk/Chartboost;->cacheInterstitial()V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_4

    .line 600
    .end local v7           #chartBoostAppId:Ljava/lang/String;
    .end local v8           #chartBoostSignature:Ljava/lang/String;
    :goto_7
    :try_start_6
    invoke-virtual/range {v33 .. v33}, Ljava/lang/String;->isEmpty()Z

    move-result v36

    if-nez v36, :cond_9

    invoke-virtual/range {v34 .. v34}, Ljava/lang/String;->isEmpty()Z

    move-result v36

    if-nez v36, :cond_9

    .line 601
    const-string v36, "engine"

    const-string v37, "Enable tapjoy"

    invoke-static/range {v36 .. v37}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 602
    const/16 v36, 0x1

    invoke-static/range {v36 .. v36}, Lcom/tapjoy/TapjoyLog;->enableLogging(Z)V

    .line 603
    move-object/from16 v0, p0

    move-object/from16 v1, v33

    move-object/from16 v2, v34

    invoke-static {v0, v1, v2}, Lcom/tapjoy/TapjoyConnect;->requestTapjoyConnect(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 604
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;

    move-result-object v36

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    invoke-virtual {v0, v1}, Lcom/tapjoy/TapjoyConnect;->setEarnedPointsNotifier(Lcom/tapjoy/TapjoyEarnedPointsNotifier;)V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_5

    .line 611
    :cond_9
    :goto_8
    :try_start_7
    sget v36, Lcom/melesta/engine/R$string;->pushwoosh_app_id:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v22

    .line 612
    .local v22, pushWooshAppId:Ljava/lang/String;
    sget v36, Lcom/melesta/engine/R$string;->pushwoosh_sender_id:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v23

    .line 613
    .local v23, pushWooshSenderId:Ljava/lang/String;
    if-eqz v22, :cond_a

    invoke-virtual/range {v22 .. v22}, Ljava/lang/String;->isEmpty()Z

    move-result v36

    if-nez v36, :cond_a

    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getIntent()Landroid/content/Intent;

    move-result-object v36

    invoke-virtual/range {v36 .. v36}, Landroid/content/Intent;->getFlags()I

    move-result v36

    if-eqz v36, :cond_a

    .line 614
    new-instance v21, Lcom/arellomobile/android/push/PushManager;

    move-object/from16 v0, v21

    move-object/from16 v1, p0

    move-object/from16 v2, v22

    move-object/from16 v3, v23

    invoke-direct {v0, v1, v2, v3}, Lcom/arellomobile/android/push/PushManager;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 616
    .local v21, pushManager:Lcom/arellomobile/android/push/PushManager;
    move-object/from16 v0, v21

    move-object/from16 v1, p0

    invoke-virtual {v0, v1}, Lcom/arellomobile/android/push/PushManager;->onStartup(Landroid/content/Context;)V

    .line 617
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getIntent()Landroid/content/Intent;

    move-result-object v36

    move-object/from16 v0, p0

    move-object/from16 v1, v36

    invoke-direct {v0, v1}, Lcom/melesta/engine/EngineActivity;->checkMessage(Landroid/content/Intent;)V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_6

    .line 623
    .end local v21           #pushManager:Lcom/arellomobile/android/push/PushManager;
    .end local v22           #pushWooshAppId:Ljava/lang/String;
    .end local v23           #pushWooshSenderId:Ljava/lang/String;
    :cond_a
    :goto_9
    :try_start_8
    new-instance v36, Lcom/melesta/engine/EngineActivity$2;

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lcom/melesta/engine/EngineActivity$2;-><init>(Lcom/melesta/engine/EngineActivity;)V

    move-object/from16 v0, v36

    invoke-virtual {v10, v0}, Lcom/melesta/engine/DatabaseHelper;->getTransactions(Lcom/melesta/engine/DatabaseHelper$IObjectFilter;)Ljava/util/List;

    move-result-object v35

    .line 633
    .local v35, transactions:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/payment/PaymentTransaction;>;"
    invoke-interface/range {v35 .. v35}, Ljava/util/List;->size()I

    move-result v36

    if-lez v36, :cond_b

    .line 634
    new-instance v32, Ljava/util/Timer;

    const-string v36, "processPayments"

    move-object/from16 v0, v32

    move-object/from16 v1, v36

    invoke-direct {v0, v1}, Ljava/util/Timer;-><init>(Ljava/lang/String;)V

    .line 635
    .local v32, t:Ljava/util/Timer;
    new-instance v36, Lcom/melesta/engine/EngineActivity$3;

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    move-object/from16 v2, v35

    invoke-direct {v0, v1, v2}, Lcom/melesta/engine/EngineActivity$3;-><init>(Lcom/melesta/engine/EngineActivity;Ljava/util/List;)V

    const-wide/16 v37, 0x1770

    move-object/from16 v0, v32

    move-object/from16 v1, v36

    move-wide/from16 v2, v37

    invoke-virtual {v0, v1, v2, v3}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;J)V

    .line 653
    .end local v32           #t:Ljava/util/Timer;
    :cond_b
    sget v36, Lcom/melesta/engine/R$string;->mobileapptracking_advertiser_id:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v18

    .line 654
    .local v18, mobileAppTrackingAdviserId:Ljava/lang/String;
    sget v36, Lcom/melesta/engine/R$string;->mobileapptracking_app_key:I

    move-object/from16 v0, v24

    move/from16 v1, v36

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v19

    .line 655
    .local v19, mobileAppTrackingAppKey:Ljava/lang/String;
    if-eqz v18, :cond_d

    invoke-virtual/range {v18 .. v18}, Ljava/lang/String;->length()I

    move-result v36

    if-lez v36, :cond_d

    .line 656
    new-instance v36, Lcom/mobileapptracker/MobileAppTracker;

    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->getBaseContext()Landroid/content/Context;

    move-result-object v37

    move-object/from16 v0, v36

    move-object/from16 v1, v37

    move-object/from16 v2, v18

    move-object/from16 v3, v19

    invoke-direct {v0, v1, v2, v3}, Lcom/mobileapptracker/MobileAppTracker;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    move-object/from16 v0, v36

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/melesta/engine/EngineActivity;->mobileAppTracker:Lcom/mobileapptracker/MobileAppTracker;

    .line 658
    sget-boolean v36, Lcom/melesta/engine/Log;->isDebug:Z

    if-eqz v36, :cond_c

    .line 659
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mobileAppTracker:Lcom/mobileapptracker/MobileAppTracker;

    move-object/from16 v36, v0

    const/16 v37, 0x1

    invoke-virtual/range {v36 .. v37}, Lcom/mobileapptracker/MobileAppTracker;->setDebugMode(Z)V

    .line 661
    :cond_c
    if-eqz v15, :cond_11

    .line 662
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mobileAppTracker:Lcom/mobileapptracker/MobileAppTracker;

    move-object/from16 v36, v0

    invoke-virtual/range {v36 .. v36}, Lcom/mobileapptracker/MobileAppTracker;->trackInstall()I

    .line 668
    :cond_d
    :goto_a
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineActivity;->init()V

    .line 670
    sget-object v36, Lcom/melesta/expansions/ActivityState;->CREATE:Lcom/melesta/expansions/ActivityState;

    move-object/from16 v0, p0

    move-object/from16 v1, v36

    invoke-direct {v0, v1}, Lcom/melesta/engine/EngineActivity;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V

    .line 671
    const-string v36, "engine"

    const-string v37, "onCreate() - done"

    invoke-static/range {v36 .. v37}, Lcom/melesta/engine/Log;->v(Ljava/lang/String;Ljava/lang/String;)V

    .line 676
    .end local v5           #arr$:[Landroid/content/pm/Signature;
    .end local v9           #configuration:Landroid/content/res/Configuration;
    .end local v10           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v14           #i$:I
    .end local v15           #isNewUser:Z
    .end local v16           #len$:I
    .end local v18           #mobileAppTrackingAdviserId:Ljava/lang/String;
    .end local v19           #mobileAppTrackingAppKey:Ljava/lang/String;
    .end local v20           #promo_res_id:I
    .end local v24           #resources:Landroid/content/res/Resources;
    .end local v26           #sharedPreferences:Landroid/content/SharedPreferences;
    .end local v28           #sigs:[Landroid/content/pm/Signature;
    .end local v29           #sponsorpayAppIdPrefsKey:Ljava/lang/String;
    .end local v33           #tapjoyAppId:Ljava/lang/String;
    .end local v34           #tapjoySecretKey:Ljava/lang/String;
    .end local v35           #transactions:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/payment/PaymentTransaction;>;"
    :goto_b
    return-void

    .line 506
    .restart local v5       #arr$:[Landroid/content/pm/Signature;
    .restart local v9       #configuration:Landroid/content/res/Configuration;
    .restart local v10       #dbh:Lcom/melesta/engine/DatabaseHelper;
    .restart local v14       #i$:I
    .restart local v16       #len$:I
    .restart local v24       #resources:Landroid/content/res/Resources;
    .restart local v26       #sharedPreferences:Landroid/content/SharedPreferences;
    .restart local v28       #sigs:[Landroid/content/pm/Signature;
    :cond_e
    const/4 v15, 0x0

    goto/16 :goto_1

    .line 508
    .restart local v15       #isNewUser:Z
    :cond_f
    sget v20, Lcom/melesta/engine/R$string;->promo_code_url:I

    goto/16 :goto_2

    .line 526
    .restart local v20       #promo_res_id:I
    :catch_0
    move-exception v11

    .line 527
    .local v11, e:Ljava/lang/Exception;
    const-string v36, "UiHelper"

    move-object/from16 v0, v36

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_1

    goto/16 :goto_3

    .line 673
    .end local v5           #arr$:[Landroid/content/pm/Signature;
    .end local v9           #configuration:Landroid/content/res/Configuration;
    .end local v10           #dbh:Lcom/melesta/engine/DatabaseHelper;
    .end local v11           #e:Ljava/lang/Exception;
    .end local v14           #i$:I
    .end local v15           #isNewUser:Z
    .end local v16           #len$:I
    .end local v20           #promo_res_id:I
    .end local v24           #resources:Landroid/content/res/Resources;
    .end local v26           #sharedPreferences:Landroid/content/SharedPreferences;
    .end local v28           #sigs:[Landroid/content/pm/Signature;
    :catch_1
    move-exception v13

    .line 674
    .local v13, exc:Ljava/lang/Exception;
    const-string v36, "onCreate"

    move-object/from16 v0, v36

    invoke-static {v0, v13}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_b

    .line 544
    .end local v13           #exc:Ljava/lang/Exception;
    .restart local v5       #arr$:[Landroid/content/pm/Signature;
    .restart local v9       #configuration:Landroid/content/res/Configuration;
    .restart local v10       #dbh:Lcom/melesta/engine/DatabaseHelper;
    .restart local v14       #i$:I
    .restart local v15       #isNewUser:Z
    .restart local v16       #len$:I
    .restart local v20       #promo_res_id:I
    .restart local v24       #resources:Landroid/content/res/Resources;
    .restart local v26       #sharedPreferences:Landroid/content/SharedPreferences;
    .restart local v28       #sigs:[Landroid/content/pm/Signature;
    .restart local v29       #sponsorpayAppIdPrefsKey:Ljava/lang/String;
    .restart local v30       #sponsorpaySecurityTokenPrefsKey:Ljava/lang/String;
    .restart local v31       #sponsorpayUserIdPrefsKey:Ljava/lang/String;
    .restart local v33       #tapjoyAppId:Ljava/lang/String;
    .restart local v34       #tapjoySecretKey:Ljava/lang/String;
    :catch_2
    move-exception v11

    .line 545
    .local v11, e:Ljava/lang/RuntimeException;
    :try_start_9
    const-string v36, "init sponsorpay"

    move-object/from16 v0, v36

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_1

    goto/16 :goto_4

    .line 570
    .end local v11           #e:Ljava/lang/RuntimeException;
    .end local v30           #sponsorpaySecurityTokenPrefsKey:Ljava/lang/String;
    .end local v31           #sponsorpayUserIdPrefsKey:Ljava/lang/String;
    .restart local v12       #egc:Ljava/lang/String;
    :cond_10
    :try_start_a
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->agsGameFeatures:Ljava/util/EnumSet;

    move-object/from16 v36, v0

    sget-object v37, Lcom/amazon/ags/api/AmazonGamesFeature;->Whispersync:Lcom/amazon/ags/api/AmazonGamesFeature;

    invoke-virtual/range {v36 .. v37}, Ljava/util/EnumSet;->add(Ljava/lang/Object;)Z
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_a} :catch_3

    goto/16 :goto_5

    .line 579
    .end local v12           #egc:Ljava/lang/String;
    :catch_3
    move-exception v11

    .line 580
    .local v11, e:Ljava/lang/Exception;
    :try_start_b
    const-string v36, "enableGameCircle"

    move-object/from16 v0, v36

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_6

    .line 595
    .end local v11           #e:Ljava/lang/Exception;
    :catch_4
    move-exception v11

    .line 596
    .restart local v11       #e:Ljava/lang/Exception;
    const-string v36, "init chartboost"

    move-object/from16 v0, v36

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_7

    .line 606
    .end local v11           #e:Ljava/lang/Exception;
    :catch_5
    move-exception v11

    .line 607
    .restart local v11       #e:Ljava/lang/Exception;
    const-string v36, "init tapjoy"

    move-object/from16 v0, v36

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_8

    .line 619
    .end local v11           #e:Ljava/lang/Exception;
    :catch_6
    move-exception v11

    .line 620
    .restart local v11       #e:Ljava/lang/Exception;
    const-string v36, "init pushWoosh"

    move-object/from16 v0, v36

    invoke-static {v0, v11}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_9

    .line 664
    .end local v11           #e:Ljava/lang/Exception;
    .restart local v18       #mobileAppTrackingAdviserId:Ljava/lang/String;
    .restart local v19       #mobileAppTrackingAppKey:Ljava/lang/String;
    .restart local v35       #transactions:Ljava/util/List;,"Ljava/util/List<Lcom/melesta/payment/PaymentTransaction;>;"
    :cond_11
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/melesta/engine/EngineActivity;->mobileAppTracker:Lcom/mobileapptracker/MobileAppTracker;

    move-object/from16 v36, v0

    invoke-virtual/range {v36 .. v36}, Lcom/mobileapptracker/MobileAppTracker;->trackUpdate()I
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_1

    goto :goto_a
.end method

.method public onCreateView()Lcom/melesta/engine/EngineGLSurfaceView;
    .locals 1

    .prologue
    .line 741
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineGLSurfaceView;-><init>(Landroid/content/Context;)V

    return-object v0
.end method

.method protected onDestroy()V
    .locals 3

    .prologue
    .line 747
    :try_start_0
    const-string v1, "engine"

    const-string v2, "onDestroy()"

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->v(Ljava/lang/String;Ljava/lang/String;)V

    .line 748
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 749
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    invoke-virtual {v1, p0}, Lcom/chartboost/sdk/Chartboost;->onDestroy(Landroid/app/Activity;)V

    .line 750
    invoke-direct {p0}, Lcom/melesta/engine/EngineActivity;->runBackup()V

    .line 751
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    invoke-virtual {v1}, Lcom/facebook/UiLifecycleHelper;->onDestroy()V

    .line 753
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    if-eqz v1, :cond_0

    .line 754
    invoke-static {p0}, Lcom/burstly/lib/conveniencelayer/Burstly;->onDestroyActivity(Landroid/app/Activity;)V

    .line 757
    :cond_0
    sget-object v1, Lcom/melesta/expansions/ActivityState;->DESTROY:Lcom/melesta/expansions/ActivityState;

    invoke-direct {p0, v1}, Lcom/melesta/engine/EngineActivity;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V

    .line 758
    const-string v1, "engine"

    const-string v2, "onDestroy() - done"

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->v(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 762
    :goto_0
    return-void

    .line 759
    :catch_0
    move-exception v0

    .line 760
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "onDestroy"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 2037
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    return v0
.end method

.method protected onNewIntent(Landroid/content/Intent;)V
    .locals 1
    .parameter "intent"

    .prologue
    .line 428
    invoke-super {p0, p1}, Landroid/app/Activity;->onNewIntent(Landroid/content/Intent;)V

    .line 429
    invoke-virtual {p0, p1}, Lcom/melesta/engine/EngineActivity;->setIntent(Landroid/content/Intent;)V

    .line 431
    invoke-direct {p0, p1}, Lcom/melesta/engine/EngineActivity;->checkMessage(Landroid/content/Intent;)V

    .line 433
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineActivity;->setIntent(Landroid/content/Intent;)V

    .line 434
    return-void
.end method

.method protected onPause()V
    .locals 3

    .prologue
    .line 767
    :try_start_0
    const-string v1, "engine"

    const-string v2, "EngineActivity  onPause"

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 768
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 769
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    invoke-virtual {v1}, Lcom/facebook/UiLifecycleHelper;->onPause()V

    .line 770
    sget-object v1, Lcom/melesta/expansions/ActivityState;->PAUSE:Lcom/melesta/expansions/ActivityState;

    invoke-direct {p0, v1}, Lcom/melesta/engine/EngineActivity;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V

    .line 773
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-virtual {v1}, Lcom/melesta/engine/EngineGLSurfaceView;->onPause()V

    .line 775
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    if-eqz v1, :cond_0

    .line 776
    invoke-static {p0}, Lcom/burstly/lib/conveniencelayer/Burstly;->onPauseActivity(Landroid/app/Activity;)V

    .line 780
    :cond_0
    const-string v1, "engine"

    const-string v2, "EngineActivity  onPause - done"

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 784
    :goto_0
    return-void

    .line 781
    :catch_0
    move-exception v0

    .line 782
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "onPause"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method protected onResume()V
    .locals 5

    .prologue
    .line 857
    :try_start_0
    const-string v3, "engine"

    const-string v4, "EngineActivity  onResume"

    invoke-static {v3, v4}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 858
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 860
    iget-object v3, p0, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    invoke-virtual {v3}, Lcom/facebook/UiLifecycleHelper;->onResume()V

    .line 862
    sget-object v3, Lcom/melesta/expansions/ActivityState;->RESUME:Lcom/melesta/expansions/ActivityState;

    invoke-direct {p0, v3}, Lcom/melesta/engine/EngineActivity;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V

    .line 865
    iget-object v3, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-virtual {v3}, Lcom/melesta/engine/EngineGLSurfaceView;->onResume()V

    .line 867
    iget-object v3, p0, Lcom/melesta/engine/EngineActivity;->mBanner:Lcom/melesta/ads/BurstlyAnimatedBanner;

    if-eqz v3, :cond_0

    .line 868
    invoke-static {p0}, Lcom/burstly/lib/conveniencelayer/Burstly;->onResumeActivity(Landroid/app/Activity;)V

    .line 871
    :cond_0
    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    .line 872
    .local v1, resources:Landroid/content/res/Resources;
    sget v3, Lcom/melesta/engine/R$string;->sponsorpay_app_id_prefs_key:I

    invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 873
    .local v2, sponsorpayAppIdPrefsKey:Ljava/lang/String;
    if-eqz v2, :cond_1

    invoke-virtual {v2}, Ljava/lang/String;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_1

    .line 874
    invoke-direct {p0}, Lcom/melesta/engine/EngineActivity;->sponsorPayRequestCoins()V

    .line 877
    :cond_1
    const-string v3, "engine"

    const-string v4, "EngineActivity  onResume - done"

    invoke-static {v3, v4}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 881
    .end local v1           #resources:Landroid/content/res/Resources;
    .end local v2           #sponsorpayAppIdPrefsKey:Ljava/lang/String;
    :goto_0
    return-void

    .line 878
    :catch_0
    move-exception v0

    .line 879
    .local v0, exc:Ljava/lang/Exception;
    const-string v3, "onResume"

    invoke-static {v3, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .locals 2
    .parameter "outState"

    .prologue
    .line 1443
    :try_start_0
    invoke-super {p0, p1}, Landroid/app/Activity;->onSaveInstanceState(Landroid/os/Bundle;)V

    .line 1444
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mUiHelper:Lcom/facebook/UiLifecycleHelper;

    invoke-virtual {v1, p1}, Lcom/facebook/UiLifecycleHelper;->onSaveInstanceState(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1448
    :goto_0
    return-void

    .line 1445
    :catch_0
    move-exception v0

    .line 1446
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "onSaveInstanceState"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method protected onStart()V
    .locals 11

    .prologue
    .line 886
    :try_start_0
    const-string v9, "engine"

    const-string v10, "EngineActivity  onStart"

    invoke-static {v9, v10}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 887
    invoke-super {p0}, Landroid/app/Activity;->onStart()V

    .line 889
    iget-object v9, p0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    invoke-virtual {v9, p0}, Lcom/chartboost/sdk/Chartboost;->onStart(Landroid/app/Activity;)V

    .line 891
    iget-object v9, p0, Lcom/melesta/engine/EngineActivity;->mFlurryApiKey:Ljava/lang/String;

    if-eqz v9, :cond_0

    iget-object v9, p0, Lcom/melesta/engine/EngineActivity;->mFlurryApiKey:Ljava/lang/String;

    invoke-virtual {v9}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_0

    .line 892
    iget-object v9, p0, Lcom/melesta/engine/EngineActivity;->mFlurryApiKey:Ljava/lang/String;

    invoke-static {p0, v9}, Lcom/flurry/android/FlurryAgent;->onStartSession(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 896
    :cond_0
    :try_start_1
    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v10

    invoke-virtual {v10}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v10, "/temp/"

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {p0}, Lcom/melesta/engine/EngineActivity;->getPackageName()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    .line 898
    .local v8, strFile:Ljava/lang/String;
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v8}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 899
    .local v3, f:Ljava/io/File;
    invoke-virtual {v3}, Ljava/io/File;->listFiles()[Ljava/io/File;

    move-result-object v7

    .line 900
    .local v7, listFiles:[Ljava/io/File;
    if-eqz v7, :cond_1

    .line 901
    move-object v0, v7

    .local v0, arr$:[Ljava/io/File;
    array-length v6, v0

    .local v6, len$:I
    const/4 v5, 0x0

    .local v5, i$:I
    :goto_0
    if-ge v5, v6, :cond_1

    aget-object v4, v0, v5

    .line 902
    .local v4, fl:Ljava/io/File;
    invoke-virtual {v4}, Ljava/io/File;->delete()Z

    .line 901
    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    .line 905
    .end local v0           #arr$:[Ljava/io/File;
    .end local v4           #fl:Ljava/io/File;
    .end local v5           #i$:I
    .end local v6           #len$:I
    :cond_1
    invoke-virtual {v3}, Ljava/io/File;->delete()Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 910
    .end local v3           #f:Ljava/io/File;
    .end local v7           #listFiles:[Ljava/io/File;
    .end local v8           #strFile:Ljava/lang/String;
    :goto_1
    :try_start_2
    sget-object v9, Lcom/melesta/expansions/ActivityState;->START:Lcom/melesta/expansions/ActivityState;

    invoke-direct {p0, v9}, Lcom/melesta/engine/EngineActivity;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V

    .line 911
    const-string v9, "engine"

    const-string v10, "EngineActivity  onStart - done"

    invoke-static {v9, v10}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 915
    :goto_2
    return-void

    .line 906
    :catch_0
    move-exception v1

    .line 907
    .local v1, e:Ljava/lang/Exception;
    invoke-static {v1}, Lcom/melesta/engine/Error;->processException(Ljava/lang/Exception;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    goto :goto_1

    .line 912
    .end local v1           #e:Ljava/lang/Exception;
    :catch_1
    move-exception v2

    .line 913
    .local v2, exc:Ljava/lang/Exception;
    const-string v9, "onStart"

    invoke-static {v9, v2}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_2
.end method

.method protected onStop()V
    .locals 3

    .prologue
    .line 920
    :try_start_0
    const-string v1, "engine"

    const-string v2, "EngineActivity  onStop"

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 921
    invoke-super {p0}, Landroid/app/Activity;->onStop()V

    .line 923
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mChartboost:Lcom/chartboost/sdk/Chartboost;

    invoke-virtual {v1, p0}, Lcom/chartboost/sdk/Chartboost;->onStop(Landroid/app/Activity;)V

    .line 925
    sget-object v1, Lcom/melesta/expansions/ActivityState;->STOP:Lcom/melesta/expansions/ActivityState;

    invoke-direct {p0, v1}, Lcom/melesta/engine/EngineActivity;->fireActivityStateChange(Lcom/melesta/expansions/ActivityState;)V

    .line 927
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mFlurryApiKey:Ljava/lang/String;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->mFlurryApiKey:Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    if-lez v1, :cond_0

    .line 928
    invoke-static {p0}, Lcom/flurry/android/FlurryAgent;->onEndSession(Landroid/content/Context;)V

    .line 930
    :cond_0
    const-string v1, "engine"

    const-string v2, "EngineActivity  onStop - done"

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 934
    :goto_0
    return-void

    .line 931
    :catch_0
    move-exception v0

    .line 932
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "onStop"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method reloadProfile()V
    .locals 1

    .prologue
    .line 1921
    new-instance v0, Lcom/melesta/engine/EngineActivity$17;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineActivity$17;-><init>(Lcom/melesta/engine/EngineActivity;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    .line 1927
    return-void
.end method

.method public removeTickListener(Lcom/melesta/engine/EngineActivity$ActivityTickListener;)V
    .locals 3
    .parameter "listener"

    .prologue
    .line 363
    :try_start_0
    iget-object v2, p0, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    monitor-enter v2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 364
    :try_start_1
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity;->listeners:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 365
    monitor-exit v2

    .line 369
    :goto_0
    return-void

    .line 365
    :catchall_0
    move-exception v1

    monitor-exit v2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :try_start_2
    throw v1
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    .line 366
    :catch_0
    move-exception v0

    .line 367
    .local v0, exc:Ljava/lang/Exception;
    const-string v1, "removeListener"

    invoke-static {v1, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public runOnGLThread(Ljava/lang/Runnable;)V
    .locals 1
    .parameter "runnable"

    .prologue
    .line 848
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    if-eqz v0, :cond_0

    if-nez p1, :cond_1

    .line 852
    :cond_0
    :goto_0
    return-void

    .line 851
    :cond_1
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity;->mGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-virtual {v0, p1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public showMessage(Ljava/lang/String;)V
    .locals 3
    .parameter "msg"

    .prologue
    .line 1504
    new-instance v0, Lcom/melesta/engine/EngineActivity$7;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineActivity$7;-><init>(Lcom/melesta/engine/EngineActivity;)V

    const/4 v1, 0x0

    new-instance v2, Lcom/melesta/engine/EngineActivity$8;

    invoke-direct {v2, p0}, Lcom/melesta/engine/EngineActivity$8;-><init>(Lcom/melesta/engine/EngineActivity;)V

    invoke-virtual {p0, p1, v0, v1, v2}, Lcom/melesta/engine/EngineActivity;->showMessageEx(Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnCancelListener;)V

    .line 1515
    return-void
.end method

.method public showMessageEx(Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnCancelListener;)V
    .locals 7
    .parameter "msg"
    .parameter "onOk"
    .parameter "onNo"
    .parameter "onCancel"

    .prologue
    .line 1519
    iget-object v6, p0, Lcom/melesta/engine/EngineActivity;->mHandler:Landroid/os/Handler;

    new-instance v0, Lcom/melesta/engine/EngineActivity$9;

    move-object v1, p0

    move-object v2, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Lcom/melesta/engine/EngineActivity$9;-><init>(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnCancelListener;)V

    invoke-virtual {v6, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 1537
    return-void
.end method

.method protected showWaitScreen(Z)V
    .locals 1
    .parameter "show"

    .prologue
    .line 2011
    new-instance v0, Lcom/melesta/engine/EngineActivity$19;

    invoke-direct {v0, p0, p1}, Lcom/melesta/engine/EngineActivity$19;-><init>(Lcom/melesta/engine/EngineActivity;Z)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 2029
    return-void
.end method
